code: def equal_levels(self, other):
          
          if self.nlevels != other.nlevels:
              return False
  
          for i in range(self.nlevels):
              if not self.levels[i].equals(other.levels[i]):
                  return False
          return True
docs: Return True if the levels of both MultiIndex objects are the same