code: def innermostFunction(categ):
      while categ.res().is_function():
          categ = categ.res()
      return categ
  
imports: from abc import ABCMeta, abstractmethod
  from nltk.ccg.api import FunctionalCategory
label_desc: Use image node_id 9 for calling a global function with example usage: innermostFunction(categ) and returns: categ