class_docstr: Class representing the direction of a function application.
  Also contains maintains information as to which combinators
  may be used with the category.
class_docstr_tok: ["Class","representing","the","direction","of","a","function","application",".","Also","contains","maintains","information","as","to","which","combinators","may","be","used","with","the","category","."]
code: def substitute(self, subs):
      if not self.is_variable():
          return self
  
      for var, restrs in subs:
          if var == "_":
              return Direction(self._dir, restrs)
      return self
  
imports: from abc import ABCMeta, abstractmethod
  from functools import total_ordering
  from nltk.internals import raise_unorderable_types
label_desc: Use image node_id 8 for calling the Direction obj's underlying member method code with example usage: obj.substitute(subs) and returns: self, self, Direction