code: def is_final(name, mro):
      """
      Checks if `name` is a `final` object in the given `mro`.
      We need to check the mro because we need to directly go into the __dict__
      of the classes. Because `final` objects are descriptor, we need to grab
      them _BEFORE_ the `__call__` is invoked.
      """
      return any(
          isinstance(getattr(c, "__dict__", {}).get(name), final)
          for c in bases_mro(mro)
      )
  
file_path: catalyst/catalyst/utils/final.py
imports: from abc import ABCMeta, abstractmethod
  from six import with_metaclass, iteritems
label_desc: Use image node_id 2 for calling a global function with example usage: is_final(name, mro) and returns: any