code: def gunzip(input_gzip_file, block_size=1024):
      
      assert os.path.splitext(input_gzip_file)[1] == '.gz'
      assert is_gzipfile(input_gzip_file)
      with gzip.open(input_gzip_file) as infile:
          with open(os.path.splitext(input_gzip_file)[0], 'w') as outfile:
              while True:
                  block = infile.read(block_size)
                  if block == '':
                      break
                  else:
                      outfile.write(block)
      return outfile.name
docs: Gunzips the input file to the same directory
  
      :param input_gzip_file: File to be gunzipped
      :return: path to the gunzipped file
      :rtype: str