class_docstr: Dispatch calls to a chain of commands until some func can handle it
  
  Usage: instantiate, execute "add" to add commands (with optional
  priority), execute normally via f() calling mechanism.
class_docstr_tok: ["Dispatch","calls","to","a","chain","of","commands","until","some","func","can","handle","it","Usage",":","instantiate",",","execute","``","add","''","to","add","commands","(","with","optional","priority",")",",","execute","normally","via","f","(",")","calling","mechanism","."]
code: def __init__(self, commands=None):
      if commands is None:
          self.chain = []
      else:
          self.chain = commands
  
file_path: catboost/contrib/python/ipython/py3/IPython/core/hooks.py
imports: import os
  import subprocess
  import sys
  from .error import TryNext
label_desc: Use image node_id 1 to create a new CommandChainDispatcher object  with example: obj = CommandChainDispatcher(commands)