code: def extract_label(image_name: str) -> str:
      image_name = os.path.splitext(image_name)[0]
      return "_".join(image_name.split("_")[:-1])
  
file_path: vissl/extra_scripts/datasets/create_oxford_pets_data_files.py
imports: import argparse
  import os
  import shutil
  from tqdm import tqdm
  from vissl.utils.download import download_and_extract_archive
  from vissl.utils.io import cleanup_dir
label_desc: Use image node_id 4 for calling a global function with example usage: extract_label(image_name) and returns: str