code: def get_fname(fname):
      r"""Extract filename from file name path.
  
      Args:
          fname (str): Filename for the yaml format configuration file
      """
      fname = osp.basename(fname)
      if fname.endswith(".yaml"):
          fname = fname[:-5]
      elif fname.endswith(".yml"):
          fname = fname[:-4]
      return fname
  
file_path: pytorch_geometric/torch_geometric/graphgym/config.py
imports: import functools
  import inspect
  import logging
  import os
  import os.path
  import warnings
  from collections.abc import Iterable
  from dataclasses import asdict
  from typing import Any
  import torch_geometric.graphgym.register
  from torch_geometric.io import fs
label_desc: Use image node_id 6 for calling a global function with example usage: get_fname(fname) and returns: fname