docs: def is_valid_optimize_same_id_sources(self):
          """
          The `optimize_same_id_sources` can be true only in the classical
          calculators.
          """
          if (self.optimize_same_id_sources and
                  'classical' in self.calculation_mode or
                  'disagg' in self.calculation_mode):
              return True
          elif self.optimize_same_id_sources:
              return False
          else:
              return True