code: def download_gpt2(model_dir="models", model_name="124M"):
      """Downloads the GPT-2 model into the current directory
      from Google Cloud Storage.
  
      Parameters
      ----------
      model_dir : str
          parent directory of model to download
  
      model_name : str
          name of the GPT-2 model to download.
          As of 22 May 2019 one of "124M" or "355M" but may later include other
          model sizes
  
      Adapted from https://github.com/openai/gpt-2/blob/master/download_model.py
      """
  
      # create the <model_dir>/<model_name> subdirectory if not present
      sub_dir = os.path.join(model_dir, model_name)
      if not os.path.exists(sub_dir):
          os.makedirs(sub_dir)
      sub_dir = sub_dir.replace("\\", "/")  # needed for Windows
  
      for file_name in [
          "checkpoint",
          "encoder.json",
          "hparams.json",
          "model.ckpt.data-00000-of-00001",
          "model.ckpt.index",
          "model.ckpt.meta",
          "vocab.bpe",
      ]:
          download_file_with_progress(
              url_base="https://openaipublic.blob.core.windows.net/gpt-2",
              sub_dir=sub_dir,
              model_name=model_name,
              file_name=file_name,
          )
  
imports: import tarfile
  import os
  import json
  import requests
  import sys
  import shutil
  import re
  from tqdm import tqdm, trange
  import numpy
  import tensorflow
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import device_lib
  import time
  from datetime import datetime
  import csv
  import argparse
  from sys import exit
  import codecs
  from gpt_2_simple.src import model, sample, encoder, memory_saving_gradients
  from gpt_2_simple.src.load_dataset import load_dataset, Sampler
  from gpt_2_simple.src.accumulate import AccumulatingOptimizer
label_desc: Use image node_id 2 for calling a global function with example usage: download_gpt2(model_dir, model_name) without return types