code: def isScramble(self, s1, s2):
      if (s1, s2) in self.dic:
          return self.dic[(s1, s2)]
      if len(s1) != len(s2) or sorted(s1) != sorted(s2):  # prunning
          self.dic[(s1, s2)] = False
          return False
      if s1 == s2:
          self.dic[(s1, s2)] = True
          return True
      for i in range(1, len(s1)):
          if (
              self.isScramble(s1[:i], s2[:i])
              and self.isScramble(s1[i:], s2[i:])
          ) or (
              self.isScramble(s1[:i], s2[-i:])
              and self.isScramble(s1[i:], s2[:-i])
          ):
              return True
      self.dic[(s1, s2)] = False
      return False
  
label_desc: Use image node_id 2 for calling the Solution obj's underlying member method code with example usage: obj.isScramble(s1, s2) and returns: False, self, False, True, True