code: def validate_columns(columns):
      if columns is None:
          return []
      elif isinstance(columns, str):
          columns = [columns]
  
      if isinstance(columns, list):
          return columns
      else:
          raise PerspectiveError(
              "Cannot parse `columns` of type: %s", str(type(columns))
          )
  
file_path: perspective/python/perspective/perspective/viewer/validate.py
imports: from datetime import datetime
  from ..core import ALL_FILTERS, Aggregate, Plugin, Sort
  from ..core.exception import PerspectiveError
label_desc: Use image node_id 2 for calling a global function with example usage: validate_columns(columns) and returns: list, columns