def resolve_field_class(field_definition):
    """Return field class most fitting of provided Swimlane field definition"""
    try:
        return _FIELD_TYPE_MAP[field_definition['$type']]
    except KeyError as error:
        error.message = 'No field available to handle Swimlane $type "{}"'.format(field_definition)
        raise
def resolve_field_class ( field_definition ) : try : return _FIELD_TYPE_MAP [ field_definition [ '$type' ] ] except KeyError as error : error . message = 'No field available to handle Swimlane $type "{}"' . format ( field_definition ) raise
Return field class most fitting of provided Swimlane field definition