code: def _init(self, domain, dtype, missing_value, window_safe, ndim, params):
          
          self.domain = domain
          self.dtype = dtype
          self.missing_value = missing_value
          self.window_safe = window_safe
          self.ndim = ndim
  
          for name, value in params:
              if hasattr(self, name):
                  raise TypeError(
                      "Parameter {name!r} conflicts with already-present"
                      " attribute with value {value!r}.".format(
                          name=name,
                          value=getattr(self, name),
                      )
                  )
              # TODO: Consider setting these values as attributes and replacing
              # the boilerplate in NumericalExpression, Rank, and
              # PercentileFilter.
  
          self.params = dict(params)
  
          # Make sure that subclasses call super() in their _validate() methods
          # by setting this flag.  The base class implementation of _validate
          # should set this flag to True.
          self._subclass_called_super_validate = False
          self._validate()
          assert self._subclass_called_super_validate, (
              "Term._validate() was not called.\n"
              "This probably means that you overrode _validate"
              " without calling super()."
          )
          del self._subclass_called_super_validate
  
          return self
docs: Parameters
          ----------
          domain : zipline.pipeline.domain.Domain
              The domain of this term.
          dtype : np.dtype
              Dtype of this term's output.
          missing_value : object
              Missing value for this term.
          ndim : 1 or 2
              The dimensionality of this term.
          params : tuple[(str, hashable)]
              Tuple of key/value pairs of additional parameters.