(
    data_item: FixtureDataItem,
)
return {
        key: field_list.field_list[0].field_value if field_list.field_list else None
        for key, field_list in data_item.fields.items()
    }
Transforms a FixtureDataItem to a dictionary.

    A ``FixtureDataItem.fields`` value looks like this::

        {
            'id': FieldList(
                doc_type='FieldList',
                field_list=[
                    FixtureItemField(
                        doc_type='FixtureItemField',
                        field_value='migori_county',
                        properties={}
                    )
                ]
            ),
            'name': FieldList(
                doc_type='FieldList',
                field_list=[
                    FixtureItemField(
                        doc_type='FixtureItemField',
                        field_value='Migori',
                        properties={'lang': 'en'}
                    )
                ]
            ),
            # ... etc. ...
        }

    Only the first value in each ``FieldList`` is selected.

    .. WARNING:: THIS MEANS THAT TRANSLATIONS ARE NOT SUPPORTED.

    The return value for the example above would be::

        {
            'id': 'migori_county',
            'name': 'Migori'
        }
Transforms a FixtureDataItem to a dictionary.
Transforms a FixtureDataItem to a dictionary .
def fixture_data_item_to_dict(
    data_item: FixtureDataItem,
) -> dict:
    """
    Transforms a FixtureDataItem to a dictionary.

    A ``FixtureDataItem.fields`` value looks like this::

        {
            'id': FieldList(
                doc_type='FieldList',
                field_list=[
                    FixtureItemField(
                        doc_type='FixtureItemField',
                        field_value='migori_county',
                        properties={}
                    )
                ]
            ),
            'name': FieldList(
                doc_type='FieldList',
                field_list=[
                    FixtureItemField(
                        doc_type='FixtureItemField',
                        field_value='Migori',
                        properties={'lang': 'en'}
                    )
                ]
            ),
            # ... etc. ...
        }

    Only the first value in each ``FieldList`` is selected.

    .. WARNING:: THIS MEANS THAT TRANSLATIONS ARE NOT SUPPORTED.

    The return value for the example above would be::

        {
            'id': 'migori_county',
            'name': 'Migori'
        }

    """
    return {
        key: field_list.field_list[0].field_value if field_list.field_list else None
        for key, field_list in data_item.fields.items()
    }
def fixture_data_item_to_dict ( data_item : FixtureDataItem , ) -> dict : return { key : field_list . field_list [ 0 ] . field_value if field_list . field_list else None for key , field_list in data_item . fields . items ( ) }