code: def uncontract_general(basis, use_copy=True):
      
  
      if use_copy:
          basis = copy.deepcopy(basis)
  
      for k, el in basis['elements'].items():
  
          if not 'electron_shells' in el:
              continue
  
          newshells = []
  
          for sh in el['electron_shells']:
              # See if we actually have to uncontract
              # Also, don't uncontract sp, spd,.... orbitals
              #      (leave that to uncontract_spdf)
              if len(sh['coefficients']) == 1 or len(sh['angular_momentum']) > 1:
                  newshells.append(sh)
              else:
                  if len(sh['angular_momentum']) == 1:
                      for c in sh['coefficients']:
                          # copy, them replace 'coefficients'
                          newsh = sh.copy()
                          newsh['coefficients'] = [c]
                          newshells.append(newsh)
  
          el['electron_shells'] = newshells
  
      # If use_basis is True, we already made our deep copy
      return prune_basis(basis, False)
docs: Removes the general contractions from a basis set
  
      The input basis set is not modified. The returned basis
      may have functions with coefficients of zero and may have duplicate
      shells.
  
      If use_copy is True, the input basis set is not modified.