# form_of

Python reference for `nagasim.appearance.form_of`. Provisional: it may change between minor versions, see [Appearance](../../appearance.md).

`nagasim.appearance.form_of`

```python
form_of(row: Mapping, pallet_carriers: frozenset[str])
```

The form one entity type draws as, from its name and icon; one of `FORMS`.

In order: a pallet carrier or a name with PALLET is a pallet; then the row's `icon`; then a
word of the name (a prop such as STRETCHER, a person, a vehicle, a container, an information
item drawn as a disc); else a carton. The size rule (a sized disc is a carton) belongs to
`forms_of`, so call `forms_of` for a whole model.

Parameters
----------
row : mapping
    An Entities row, or `{"name": TYPE}` for a type with no row.
pallet_carriers : frozenset of str
    The upper-cased `carrier_type`s of BATCH blocks with a `pattern`.

Returns
-------
str
    `carton`, `container`, `pallet`, `person`, `vehicle`, `disc` or `prop`.

See Also
--------
nagasim.appearance.forms_of : The form and size of every entity type of a model.

Examples
--------
>>> from nagasim.appearance import form_of
>>> form_of({"name": "PATIENT"}, frozenset())
'person'
