code: def gen_cols_name(
      columns: Union[List[str], str], name_sep: str = "_"
  ) -> str:
      if isinstance(columns, str):
          return columns
      elif isinstance(columns, list):
          return name_sep.join(columns)
      else:
          invalidInputError(
              False, "item should be either str or list of str"
          )
  
imports: from bigdl.dllib.utils.file_utils import callZooFunc
  from pyspark.sql.types import IntegerType, ShortType, LongType, FloatType, DecimalType, DoubleType, BooleanType
  from pyspark.sql.functions import broadcast, udf
  from bigdl.dllib.utils.log4Error import *
  import warnings
  from bigdl.dllib.utils.log4Error import *
  from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Union
label_desc: Use image node_id 22 for calling a global function with example usage: gen_cols_name(columns, name_sep) and returns: columns, name_sep