code: def append_dims_and_file_extension(fname, data_df):
      
      # If there's no .gct at the end of output file name, add the dims and .gct
      if not fname.endswith(".gct"):
          out_fname = '{0}_n{1}x{2}.gct'.format(fname, data_df.shape[1], data_df.shape[0])
          return out_fname
  
      # Otherwise, only add the dims
      else:
          basename = os.path.splitext(fname)[0]
          out_fname = '{0}_n{1}x{2}.gct'.format(basename, data_df.shape[1], data_df.shape[0])
          return out_fname
docs: Append dimensions and file extension to output filename.
      N.B. Dimensions are cols x rows.
  
      Args:
          fname (string): output filename
          data_df (pandas df)
      Returns:
          out_fname (string): output filename with matrix dims and .gct appended