original_docstring: 
          Apply a set of variable bindings on the variables of a term.
  
          Args:
              binding: The set of variable bindings to apply on the term.
  
          Returns:
              A new term where the variables are replaced by their bindings.
          
docstring: Apply a set of variable bindings on the variables of a term.
docstring_tokens: Apply a set of variable bindings on the variables of a term .
code: def apply_binding(self, binding):
          """
          Apply a set of variable bindings on the variables of a term.
  
          Args:
              binding: The set of variable bindings to apply on the term.
  
          Returns:
              A new term where the variables are replaced by their bindings.
          """
          assert type(binding) == dict, "Binding must be a dict"
          for key, value in binding.items():
              assert isinstance(key, Variable),\
                  "Keys in binding must be variables"
              assert isinstance(value, Term),\
                  "Variable bindings must be terms"
  
          def rename(t):
              if type(t.head) == Variable:
                  return binding[t.head] or t
              else:
                  args = []
                  for arg in t.args:
                      args.append(rename(arg))
                  return Term(t.head, tuple(args))
  
          return rename(self)
code_tokens: def apply_binding ( self , binding ) : assert type ( binding ) == dict , "Binding must be a dict" for key , value in binding . items ( ) : assert isinstance ( key , Variable ) , "Keys in binding must be variables" assert isinstance ( value , Term ) , "Variable bindings must be terms" def rename ( t ) : if type ( t . head ) == Variable : return binding [ t . head ] or t else : args = [ ] for arg in t . args : args . append ( rename ( arg ) ) return Term ( t . head , tuple ( args ) ) return rename ( self )
short_docstring: Apply a set of variable bindings on the variables of a term.
short_docstring_tokens: Apply a set of variable bindings on the variables of a term .
comment: """
          Apply a set of variable bindings on the variables of a term.
  
          Args:
              binding: The set of variable bindings to apply on the term.
  
          Returns:
              A new term where the variables are replaced by their bindings.
          """