def _convert_agent_types(ind, to_string=False, **kwargs):
    '''Convenience method to allow specifying agents by class or class name.'''
    if to_string:
        return serialize_distribution(ind, **kwargs)
    return deserialize_distribution(ind, **kwargs)
Convenience method to allow specifying agents by class or class name.