docs: def get_checksum(request, pid):
      """MNRead.getChecksum(session, did[, checksumAlgorithm]) → Checksum."""
      # MNRead.getChecksum() requires that a new checksum be calculated. Cannot
      # simply return the checksum from the sysmeta.
      #
      # If the checksumAlgorithm argument was not provided, it defaults to
      # the system wide default checksum algorithm.
      algorithm = request.GET.get(
          'checksumAlgorithm', d1_common.const.DEFAULT_CHECKSUM_ALGORITHM
      )
  
      if not d1_common.checksum.is_supported_algorithm(algorithm):
          raise d1_common.types.exceptions.InvalidRequest(
              0,
              'Invalid checksum algorithm. invalid="{}", supported="{}"'.format(
                  algorithm,
                  ', '.join(
                      list(
                          d1_common.checksum.DATAONE_TO_PYTHON_CHECKSUM_ALGORITHM_MAP.keys()
                      )
                  ),
              ),
          )
  
      sciobj_model = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid)
      with _get_sciobj_iter(sciobj_model) as sciobj_iter:
          checksum_obj = d1_common.checksum.create_checksum_object_from_iterator(
              sciobj_iter, algorithm
          )
      # Log the access of this object.
      # TODO: look into log type other than 'read'
      d1_gmn.app.event_log.log_read_event(pid, request)
      return django.http.HttpResponse(
          checksum_obj.toxml('utf-8'), d1_common.const.CONTENT_TYPE_XML
      )