code: def resolve_field(self, field):
          '''
          Resolve a field from name
  
          :param field: name of the field to resolve
          :rtype: BaseField
          :return: the resolved field
          :raises: KittyException if field could not be resolved
          '''
          if isinstance(field, BaseField):
              return field
          name = field
          if name.startswith('/'):
              return self.resolve_absolute_name(name)
          resolved_field = self.scan_for_field(name)
          if not resolved_field:
              container = self.enclosing
              if container:
                  resolved_field = container.resolve_field(name)
          if not resolved_field:
              raise KittyException('Could not resolve field by name (%s)' % name)
          return resolved_fielf resolve_field(self, field):
          '''
          Resolve a field from name
  
          :param field: name of the field to resolve
          :rtype: BaseField
          :return: the resolved field
          :raises: KittyException if field could not be resolved
          '''
          if isinstance(field, BaseField):
              return field
          name = field
          if name.startswith('/'):
              return self.resolve_absolute_name(name)
          resolved_field = self.scan_for_field(name)
          if not resolved_field:
              container = self.enclosing
              if container:
                  resolved_field = container.resolve_field(name)
          if not resolved_field:
              raise KittyException('Could not resolve field by name (%s)' % name)
          return resolved_field
docs: Resolve a field from name
  
          :param field: name of the field to resolve
          :rtype: BaseField
          :return: the resolved field
          :raises: KittyException if field could not be resolved