<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_api_field_data(self):
 """ Field data to serialize for use on front-end side, for example will include choices available for a choice field """

        field = self.setup_field()
        d = {
            'class': field.__class__.__name__,
            'widget': {
                'class': field.widget.__class__.__name__
            }
        }

        try:
            d['input_type'] = field.widget.input_type
        except AttributeError:
            # some widgets, such as Select do not have an input type
            # in django < 1.11
            d['input_type'] = None

        return d