parameters: (self, constraint, factory=None)
return_statement: return factory
docstring: 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.
docstring_summary: Register a bijection/transformation from unconstrained space to the domain
          specified by `constraint`.
docstring_tokens: Register a bijection / transformation from unconstrained space to the domain specified by constraint .
function: 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
function_tokens: def register ( self , constraint , factory = 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