'Get the options for a field with IS_IN_SET
@param field: the Field
@param lookup: the look-up table name (if field is a foreign key)
@return: a list of tuples (key, label) with the field options'

def get_options(self, field, lookup=None):

    requires = field.requires
    if (not requires):
        return None
    if isinstance(requires, (list, tuple)):
        requires = requires[0]
    if isinstance(requires, IS_EMPTY_OR):
        requires = requires.other
    fieldtype = str(field.type)
    if (fieldtype[:9] == 'reference'):
        if (field.writable and (not self.has_mobile_form(lookup))):
            add = self._references[lookup].add
            if hasattr(requires, 'options'):
                for (value, label) in requires.options():
                    if value:
                        add(long(value))
        return None
    elif (fieldtype in ('string', 'integer')):
        if isinstance(requires, IS_IN_SET):
            options = []
            for (value, label) in requires.options():
                if (value is not None):
                    options.append((value, s3_str(label)))
            return options
        else:
            return None
    else:
        return None
