def _mro(cls):
 if isinstance(cls, type):
  return cls.__mro__
 else:
  mro = [cls]
  for base in cls.__bases__:
   mro.extend(_mro(base))
  return mro

def _mro ( cls ) : if isinstance ( cls , type ) : return cls . __mro__ else : mro = [ cls ] for base in cls . __bases__ : mro . extend ( _mro ( base ) ) return mro
return the method resolution order for cls -- i .