code: def get_supercell_matrix(self, supercell, struct):
          
          if self._primitive_cell:
              raise ValueError("get_supercell_matrix cannot be used with the "
                               "primitive cell option")
          struct, supercell, fu, s1_supercell = self._preprocess(struct,
                                                                 supercell, False)
  
          if not s1_supercell:
              raise ValueError("The non-supercell must be put onto the basis"
                               " of the supercell, not the other way around")
  
          match = self._match(struct, supercell, fu, s1_supercell, use_rms=True,
                              break_on_match=False)
  
          if match is None:
              return None
  
          return match[2]
docs: Returns the matrix for transforming struct to supercell. This
          can be used for very distorted 'supercells' where the primitive cell
          is impossible to find