docstr: This is the main entry to the visitor. The visitor will visit object
  obj.
  
  The visitor will first determine if there is a registered (via
  @register()) visit function for the type of object. If there is, it
  will be called, and (visitor, obj, *args, **kwargs) will be passed to
  the user visit function.
  
  If there is no user-registered visit function, of if there is and it
  returns True, or it returns None (or doesn't return anything) and
  visitor.defaultStop is False (default), then the visitor will proceed
  to dispatch to one of self.visitObject(), self.visitList(),
  self.visitDict(), or self.visitLeaf() (any of which can be overriden in
  a subclass).
docstr_tok: ["This","is","the","main","entry","to","the","visitor",".","The","visitor","will","visit","object","obj",".","The","visitor","will","first","determine","if","there","is","a","registered","(","via","@","register","(",")",")","visit","function","for","the","type","of","object",".","If","there","is",",","it","will","be","called",",","and","(","visitor",",","obj",",","*","args",",","*","*","kwargs",")","will","be","passed","to","the","user","visit","function",".","If","there","is","no","user-registered","visit","function",",","of","if","there","is","and","it","returns","True",",","or","it","returns","None","(","or","does","n't","return","anything",")","and","visitor.defaultStop","is","False","(","default",")",",","then","the","visitor","will","proceed","to","dispatch","to","one","of","self.visitObject","(",")",",","self.visitList","(",")",",","self.visitDict","(",")",",","or","self.visitLeaf","(",")","(","any","of","which","can","be","overriden","in","a","subclass",")","."]
code: def visit(self, obj, *args, **kwargs):
      """This is the main entry to the visitor. The visitor will visit object
      obj.
  
      The visitor will first determine if there is a registered (via
      @register()) visit function for the type of object. If there is, it
      will be called, and (visitor, obj, *args, **kwargs) will be passed to
      the user visit function.
  
      If there is no user-registered visit function, of if there is and it
      returns True, or it returns None (or doesn't return anything) and
      visitor.defaultStop is False (default), then the visitor will proceed
      to dispatch to one of self.visitObject(), self.visitList(),
      self.visitDict(), or self.visitLeaf() (any of which can be overriden in
      a subclass)."""
  
      visitorFunc = self._visitorsFor(obj).get(None, None)
      if visitorFunc is not None:
          ret = visitorFunc(self, obj, *args, **kwargs)
          if ret == False or (ret is None and self.defaultStop):
              return
      if hasattr(obj, "__dict__") and not isinstance(obj, enum.Enum):
          self.visitObject(obj, *args, **kwargs)
      elif isinstance(obj, list):
          self.visitList(obj, *args, **kwargs)
      elif isinstance(obj, dict):
          self.visitDict(obj, *args, **kwargs)
      else:
          self.visitLeaf(obj, *args, **kwargs)
  
file_path: catboost/contrib/python/fonttools/fontTools/misc/visitor.py
imports: import enum
label_desc: Use image node_id 11 for calling the Visitor obj's underlying member method code with example usage: obj.visit(obj) without return types