code: def check_cols_exists(
      columns: List[str], column: Union[List[str], str], arg_name: str
  ) -> None:
      if isinstance(column, str):
          invalidInputError(
              column in columns,
              column
              + " in "
              + arg_name
              + " does not exist in SparkXShards",
          )
      elif isinstance(column, list):
          for single_column in column:
              invalidInputError(
                  single_column in columns,
                  "{} in {} does not exist in SparkXShards".format(
                      single_column, arg_name
                  ),
              )
      else:
          invalidInputError(
              False,
              "elements in column should be str or list of str but"
              " get " + str(column),
          )
  
imports: from bigdl.dllib.utils.file_utils import get_file_list, callZooFunc
  from bigdl.dllib.utils.utils import convert_row_to_numpy
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.utils.log4Error import *
  import pyspark.sql.functions
  from typing import TYPE_CHECKING, Dict, List, Optional, Type, Union
  from numpy import float32, int32
label_desc: Use image node_id 29 for calling a global function with example usage: check_cols_exists(columns, column, arg_name) without return types