docs: def validate(fname):
      """ This function uses dciodvfy to generate
      a list of warnings and errors discovered within
      the DICOM file.
  
      :param fname: Location and filename of DICOM file.
      """
      validation = {
          "errors": [],
          "warnings": []
      }
      for line in _process(fname):
          kind, message = _determine(line)
          if kind in validation:
              validation[kind].append(message)
      return validation