class_docstr: Construct a PassManager.
  
  Collects passes and constraints. This defines the pass schedule, manages
  pass constraints and pass execution.
  
  Args:
      passes (Optional[List[Callable]]): list of passes. A pass is a
          callable which modifies an object and returns modified object
      constraint (Optional[List[Callable]]): list of constraints. A
          constraint is a callable which takes two passes (A, B) and returns
          True if A depends on B and False otherwise. See implementation of
          `this_before_that_pass_constraint` for example.
class_docstr_tok: ["Construct","a","PassManager",".","Collects","passes","and","constraints",".","This","defines","the","pass","schedule",",","manages","pass","constraints","and","pass","execution",".","Args",":","passes","(","Optional","[","List","[","Callable","]","]",")",":","list","of","passes",".","A","pass","is","a","callable","which","modifies","an","object","and","returns","modified","object","constraint","(","Optional","[","List","[","Callable","]","]",")",":","list","of","constraints",".","A","constraint","is","a","callable","which","takes","two","passes","(","A",",","B",")","and","returns","True","if","A","depends","on","B","and","False","otherwise",".","See","implementation","of","`","this_before_that_pass_constraint","`","for","example","."]
code: def build_from_passlist(cls, passes):
      pm = PassManager(passes)
      # TODO(alexbeloi): add constraint management/validation
      return pm
  
file_path: pytorch/torch/fx/passes/pass_manager.py
imports: from functools import wraps
  from inspect import unwrap
  from typing import Callable, List, Optional
  import logging
label_desc: Use image node_id 2 for calling the PassManager obj's underlying member method code with example usage: obj.build_from_passlist(cls, passes) and returns: pm