class_docstr: A PipelineHooks that delegates to one or more other hooks.
  
  Parameters
  ----------
  hooks : list[implements(PipelineHooks)]
      Sequence of hooks to delegate to.
code: def __new__(cls, hooks):
      if len(hooks) == 0:
          # OPTIMIZATION: Short-circuit to a NoHooks if we don't have any
          # sub-hooks.
          return NoHooks()
      elif len(hooks) == 1:
          # OPTIMIZATION: Unwrap delegation layer if we only have one
          # sub-hook.
          return hooks[0]
      else:
          self = super(DelegatingHooks, cls).__new__(cls)
          self._hooks = hooks
          return self
  
imports: from interface import implements
  from zipline.utils.compat import ExitStack, contextmanager, wraps
  from .iface import PipelineHooks, PIPELINE_HOOKS_CONTEXT_MANAGERS
  from .no import NoHooks
label_desc: Use image node_id 1 for calling the DelegatingHooks obj's underlying member method code with example usage: obj.__new__(cls, hooks) and returns: NoHooks, hooks, self