'Check an item of `fieldsets`, i.e. check that this is a pair of a
set name and a dictionary containing "fields" key.'

def _check_fieldsets_item(self, obj, model, fieldset, label):

    if (not isinstance(fieldset, (list, tuple))):
        return must_be('a    list    or    tuple', option=label, obj=obj, id='admin.E008')
    elif (len(fieldset) != 2):
        return must_be('of    length    2', option=label, obj=obj, id='admin.E009')
    elif (not isinstance(fieldset[1], dict)):
        return must_be('a    dictionary', option=('%s[1]' % label), obj=obj, id='admin.E010')
    elif ('fields' not in fieldset[1]):
        return [checks.Error(("The    value    of    '%s[1]'    must    contain    the    key    'fields'." % label), obj=obj.__class__, id='admin.E011')]
    elif (not isinstance(fieldset[1]['fields'], (list, tuple))):
        return must_be('a    list    or    tuple', option=("%s[1]['fields']" % label), obj=obj, id='admin.E008')
    fields = flatten(fieldset[1]['fields'])
    if (len(fields) != len(set(fields))):
        return [checks.Error(("There    are    duplicate    field(s)    in    '%s[1]'." % label), obj=obj.__class__, id='admin.E012')]
    return list(chain.from_iterable((self._check_field_spec(obj, model, fieldset_fields, ('%s[1]["fields"]' % label)) for fieldset_fields in fieldset[1]['fields'])))
