code: def unzip_file_if_necessary(self, source_file):
          
          if source_file.endswith(".gz"):
              self.print_message("Decompressing '%s'" % source_file)
              subprocess.check_call(["gunzip", "--force", source_file])
              source_file = source_file[:-len(".gz")]
          return source_file
docs: Unzip file if zipped.