code: def foreign_keys(self):
          
          foreign_keys = self.__current_descriptor.get('foreignKeys', [])
          for key in foreign_keys:
              key.setdefault('fields', [])
              key.setdefault('reference', {})
              key['reference'].setdefault('resource', '')
              key['reference'].setdefault('fields', [])
              if not isinstance(key['fields'], list):
                  key['fields'] = [key['fields']]
              if not isinstance(key['reference']['fields'], list):
                  key['reference']['fields'] = [key['reference']['fields']]
          return foreign_keys
docs: https://github.com/frictionlessdata/tableschema-py#schema