def get_field_schema(name, field):
field_schema = {<EOL>'<STR_LIT:type>': '<STR_LIT:string>',<EOL>}<EOL>if field.label:<EOL><INDENT>field_schema['<STR_LIT:title>'] = str(field.label)  <EOL><DEDENT>if field.help_text:<EOL><INDENT>field_schema['<STR_LIT:description>'] = str(field.help_text)  <EOL><DEDENT>if isinstance(field, (fields.URLField, fields.FileField)):<EOL><INDENT>field_schema['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>elif isinstance(field, fields.EmailField):<EOL><INDENT>field_schema['<STR_LIT>'] = '<STR_LIT:email>'<EOL><DEDENT>elif isinstance(field, fields.DateTimeField):<EOL><INDENT>field_schema['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>elif isinstance(field, fields.DateField):<EOL><INDENT>field_schema['<STR_LIT>'] = '<STR_LIT:date>'<EOL><DEDENT>elif isinstance(field, (fields.DecimalField, fields.FloatField)):<EOL><INDENT>field_schema['<STR_LIT:type>'] = '<STR_LIT>'<EOL><DEDENT>elif isinstance(field, fields.IntegerField):<EOL><INDENT>field_schema['<STR_LIT:type>'] = '<STR_LIT>'<EOL><DEDENT>elif isinstance(field, fields.NullBooleanField):<EOL><INDENT>field_schema['<STR_LIT:type>'] = '<STR_LIT>'<EOL><DEDENT>elif isinstance(field.widget, widgets.CheckboxInput):<EOL><INDENT>field_schema['<STR_LIT:type>'] = '<STR_LIT>'<EOL><DEDENT>if getattr(field, '<STR_LIT>', []):<EOL><INDENT>field_schema['<STR_LIT>'] = sorted([choice[<NUM_LIT:0>] for choice in field.choices])<EOL><DEDENT>if isinstance(field.widget, (widgets.Select, widgets.ChoiceWidget)):<EOL><INDENT>if field.widget.allow_multiple_selected:<EOL><INDENT>field_schema['<STR_LIT>'] = {<EOL>'<STR_LIT:type>': field_schema['<STR_LIT:type>'],<EOL>}<EOL>if '<STR_LIT>' in field_schema:<EOL><INDENT>field_schema['<STR_LIT>']['<STR_LIT>'] = field_schema.pop('<STR_LIT>')<EOL><DEDENT>field_schema['<STR_LIT:type>'] = '<STR_LIT>'<EOL><DEDENT><DEDENT>return field_schema<EOL>
Returns a JSON Schema representation of a form field.