code: def write_legacy_file():
      # force our cwd to be the first searched
      sys.path.insert(0, "")
  
      if not 3 <= len(sys.argv) <= 4:
          sys.exit(
              "Specify output directory and storage type: generate_legacy_"
              "storage_files.py <output_dir> <storage_type> "
          )
  
      output_dir = str(sys.argv[1])
      storage_type = str(sys.argv[2])
  
      if not os.path.exists(output_dir):
          os.mkdir(output_dir)
  
      if storage_type == "pickle":
          write_legacy_pickles(output_dir=output_dir)
      else:
          sys.exit("storage_type must be one of {'pickle'}")
  
file_path: pandas/pandas/tests/io/generate_legacy_storage_files.py
imports: from datetime import timedelta
  import os
  import pickle
  import platform
  import sys
  import numpy
  import pandas
  from pandas import Categorical, DataFrame, Index, MultiIndex, NaT, Period, RangeIndex, Series, Timestamp, bdate_range, date_range, interval_range, period_range, timedelta_range
  from pandas.arrays import SparseArray
  from pandas.tseries.offsets import FY5253, BusinessDay, BusinessHour, CustomBusinessDay, DateOffset, Day, Easter, Hour, LastWeekOfMonth, Minute, MonthBegin, MonthEnd, QuarterBegin, QuarterEnd, SemiMonthBegin, SemiMonthEnd, Week, WeekOfMonth, YearBegin, YearEnd
label_desc: Use image node_id 7 for calling a global function with example usage: write_legacy_file() without return types