code: def load_input_text(input_obj):
      """Checks input_obj is either the path to a txt file or a text string.
      If input_obj is a txt file it returns a list of strings."""
  
      if isinstance(input_obj, str) and os.path.isfile(input_obj):
          if not input_obj.endswith(".txt"):
              raise ValueError(
                  "Invalid file type: only txt files supported."
              )
          text = open(input_obj).read().splitlines()
      elif isinstance(input_obj, str):
          text = input_obj
      else:
          raise ValueError(
              "Invalid input type: input type must be a string or a txt file."
          )
      return text
  
imports: import argparse
  import os
  import pandas
  from detoxify import Detoxify
label_desc: Use image node_id 1 for calling a global function with example usage: load_input_text(input_obj) and returns: text