code: def _collect_fields(self):
          
          for f in itervalues(self.properties.to_dict()):
              yield f
              # multi fields
              if hasattr(f, 'fields'):
                  for inner_f in itervalues(f.fields.to_dict()):
                      yield inner_f
              # nested and inner objects
              if hasattr(f, '_collect_fields'):
                  for inner_f in f._collect_fields():
                      yield inner_f
docs: Iterate over all Field objects within, including multi fields.