code: def save_as(self, fname, obj=None):
          
          writer = gdcm.Writer()
          writer.SetFileName(fname)
          if obj is None and self._anon_obj:
              obj = self._anon_obj
          else:
              raise ValueError("Need DICOM object, e.g. obj=gdcm.Anonymizer()")
          writer.SetFile(obj.GetFile())
          if not writer.Write():
              raise IOError("Could not save DICOM file")
          return True
docs: Save DICOM file given a GDCM DICOM object.
          Examples of a GDCM DICOM object:
          * gdcm.Writer()
          * gdcm.Reader()
          * gdcm.Anonymizer()
  
          :param fname: DICOM file name to be saved
          :param obj: DICOM object to be saved, if None, Anonymizer() is used