'Return data from a subset of fields of some item'

def fielder(self, structure, fields_list):

    item = {}
    for field in fields_list:
        internal = self.array_re.search(field)
        if (field in structure.keys()):
            item[field] = structure[field]
        elif (internal and (internal.group(1) in structure.keys())):
            outer = internal.group(1)
            inner = internal.group(2)
            if (isinstance(structure[outer], dict) and (inner in structure[outer])):
                item[field] = structure[outer][inner]
        elif ('interfaces' in structure.keys()):
            for device in structure['interfaces'].keys():
                if (field in structure['interfaces'][device]):
                    item[field] = ((device + ':    ') + structure['interfaces'][device][field])
    return item
