def create_fields(field_meta_data: list):
    """ metaprogramming script that returns the dictionary of attributes for a type model data class """
    attributes = {}
    for field in field_meta_data:
        kw_args = []
        if 'title' in field.keys():
            kw_args.append('title="%s"' % field['title'])
        if 'description' in field.keys():
            kw_args.append('description="%s"' % field['description'])
        if 'default' in field.keys():
            if type(field['default']) == str:
                kw_args.append('default="%s"' % field['default'])
            else:
                kw_args.append('default=%s' % field['default'])
        for k, v in field['attributes'].items():
            if k not in ('name', 'type'):
                if type(v) == str:
                    kw_args.append('%s="%s"' % (k, v))
                else:
                    kw_args.append('%s=%s' % (k, v))
        validator = eval('validators.%s(%s)' % (field['type'], ', '.join(
            kw_args)))
        attributes[field['name']] = validator
    return attributes
