code: def is_obsoleted_by_pid(pid):
      
      return d1_gmn.app.models.ScienceObject.objects.filter(
          obsoleted_by__did=pid
      ).exists()
docs: Return True if ``pid`` is referenced in the obsoletedBy field of any object.
  
      This will return True even if the PID is in the obsoletes field of an object that
      does not exist on the local MN, such as replica that is in an incomplete chain.