class_docstr: Abstract Class for registering and storing mappings from domain
  to bijections/transformations
docstr: Register a bijection/transformation from unconstrained space to the domain
  specified by `constraint`.
  
  Parameters
  ----------
  constraint : Type or Object
      A class of constraint or an object of constraint
  factory : callable
      A function that outputs a `transformation` given a `constraint`,
      by default None.
docstr_tok: ["Register","a","bijection\/transformation","from","unconstrained","space","to","the","domain","specified","by","`","constraint","`",".","Parameters","--","--","--","--","--","constraint",":","Type","or","Object","A","class","of","constraint","or","an","object","of","constraint","factory",":","callable","A","function","that","outputs","a","`","transformation","`","given","a","`","constraint","`",",","by","default","None","."]
code: def register(self, constraint, factory=None):
      """Register a bijection/transformation from unconstrained space to the domain
      specified by `constraint`.
  
      Parameters
      ----------
      constraint : Type or Object
          A class of constraint or an object of constraint
      factory : callable
          A function that outputs a `transformation` given a `constraint`,
          by default None.
      """
      # Decorator mode
      if factory is None:
          return lambda factory: self.register(constraint, factory)
  
      if isinstance(constraint, Constraint):
          constraint = type(constraint)
  
      if not isinstance(constraint, type) or not issubclass(
          constraint, Constraint
      ):
          raise TypeError(
              "Expected constraint to be either a Constraint subclass or instance, "
              "but got {}".format(constraint)
          )
  
      self._storage[constraint] = factory
      return factory
  
file_path: mxnet/python/mxnet/gluon/probability/transformation/domain_map.py
imports: from numbers import Number
  from .transformation import ExpTransform, AffineTransform, SigmoidTransform, ComposeTransform
  from ..distributions.constraint import Constraint, Positive, GreaterThan, GreaterThanEq, LessThan, Interval, HalfOpenInterval
label_desc: Use image node_id 2 for calling the domain_map obj's underlying member method code with example usage: obj.register(constraint, factory) and returns: factory, function