code: def or_(*penalties, **settings):  # XXX: not a decorator, should be?
      """create a single penalty that selects the minimum of several penalties
  
      Inputs:
          penalties -- penalty functions
  
      Additional Inputs:
          ptype -- penalty function type [default: linear_equality]
          args -- arguments for the penalty function [default: ()]
          kwds -- keyword arguments for the penalty function [default: {}]
          k -- penalty multiplier [default: 1]
          h -- iterative multiplier [default: 5]
  
      NOTE: The defaults provide a linear combination of the individual penalties
          without any scaling. A different ptype (from 'mystic.penalty') will
          apply a nonlinear scaling to the combined penalty, while a different
          k will apply a linear scaling.
  
      NOTE: This function is also useful for combining constraints solvers
          into a single constraints solver, however can not do so directly.
          Constraints solvers must first be converted to penalty functions
          (i.e. with 'as_penalty'), then combined, then can be converted to
          a constraints solver (i.e. with 'as_constraint'). The resulting
          constraints will likely be more expensive to evaluate and less
          accurate than writing the constraints solver from scratch.
      """
      k = settings.setdefault("k", 1)
      if k is None:
          del settings["k"]
      if "ptype" in settings:
          ptype = settings["ptype"]
          del settings["ptype"]
      else:
          ptype = None
      if ptype is None:
          from mystic.penalty import linear_equality as ptype
      penalty = lambda x: min(
          p(x) for p in penalties
      )  # XXX: ZeroDivisionError?
      pf = ptype(penalty, **settings)(lambda x: 0.0)
      pfdoc = "\n-- OR --\n".join(
          p.__doc__ for p in penalties if p.__doc__
      )
      pfdoc = (
          "[ " + pfdoc + " ]" if pfdoc else pfdoc
      )  # XXX: can be [p] w/no OR
      pf.__doc__ = pfdoc.rstrip("\n")
      pf.__name__ = "penalty"
      return pf
  
file_path: mystic/mystic/coupler.py
label_desc: Use image node_id 8 for calling a global function with example usage: or_() and returns: pf