code: def _mro(cls):
      """
      Return the method resolution order for ``cls`` -- i.e., a list
      containing ``cls`` and all its base classes, in the order in which
      they would be checked by ``getattr``.  For new-style classes, this
      is just cls.__mro__.  For classic classes, this can be obtained by
      a depth-first left-to-right traversal of ``__bases__``.
      """
      if isinstance(cls, type):
          return cls.__mro__
      else:
          mro = [cls]
          for base in cls.__bases__:
              mro.extend(_mro(base))
          return mro
  
imports: import fnmatch
  import locale
  import os
  import re
  import stat
  import subprocess
  import sys
  import textwrap
  import types
  import warnings
  from xml.etree import ElementTree
label_desc: Use image node_id 7 for calling a global function with example usage: _mro(cls) and returns: cls, mro