code: def get_essay(
      essay_id: str, input_dir: str, is_train: bool = True
  ) -> str:
      parent_path = (
          input_dir + "train" if is_train else input_dir + "test"
      )
      essay_path = os.path.join(parent_path, f"{essay_id}.txt")
      essay_text = open(essay_path, "r").read()
      return essay_text
  
imports: import os
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: get_essay(essay_id, input_dir, is_train) and returns: essay_text