code: def _determine_spec(self, index):
          
  
          name, field_spec, field_params = self._fields[index]
          value_spec = field_spec
          spec_override = None
  
          if self._spec_callbacks is not None and name in self._spec_callbacks:
              callback = self._spec_callbacks[name]
              spec_override = callback(self)
              if spec_override:
                  # Allow a spec callback to specify both the base spec and
                  # the override, for situations such as OctetString and parse_as
                  if spec_override.__class__ == tuple and len(spec_override) == 2:
                      field_spec, value_spec = spec_override
                      if value_spec is None:
                          value_spec = field_spec
                          spec_override = None
                  # When no field spec is specified, use a single return value as that
                  elif field_spec is None:
                      field_spec = spec_override
                      value_spec = field_spec
                      spec_override = None
                  else:
                      value_spec = spec_override
  
          elif self._oid_nums is not None and self._oid_nums[1] == index:
              oid = self._lazy_child(self._oid_nums[0]).native
              if oid in self._oid_specs:
                  spec_override = self._oid_specs[oid]
                  value_spec = spec_override
  
          return (name, field_spec, value_spec, field_params, spec_override)
docs: Determine how a value for a field should be constructed
  
          :param index:
              The field number
  
          :return:
              A tuple containing the following elements:
               - unicode string of the field name
               - Asn1Value class of the field spec
               - Asn1Value class of the value spec
               - None or dict of params to pass to the field spec
               - None or Asn1Value class indicating the value spec was derived from an OID or a spec callback