code: def is_gpt2_downloaded(model_dir="models", model_name="124M"):
      """Checks if the original model + associated files are present in folder."""
  
      for filename in [
          "checkpoint",
          "encoder.json",
          "hparams.json",
          "model.ckpt.data-00000-of-00001",
          "model.ckpt.index",
          "model.ckpt.meta",
          "vocab.bpe",
      ]:
          if not os.path.isfile(
              os.path.join(model_dir, model_name, filename)
          ):
              return False
      return True
  
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 17 for calling a global function with example usage: is_gpt2_downloaded(model_dir, model_name) and returns: True, False