code: def get_cust_cols(path):
      
      required_keys = ["title", "id", "sType", "visible"]
  
      with open(path, 'r') as f:
          try:
              cust_cols = ast.literal_eval(f.read())
          except Exception as err:
              sys.stderr.write("Invalid custom columns file: {}\n".format(path))
              sys.stderr.write("{}\n".format(err))
              sys.exit(1)
  
      # Validate
      for col in cust_cols:
          for required_key in required_keys:
              if required_key not in col:
                  sys.stderr.write("Missing required key '{}' in custom "
                                   "column {}\n".format(required_key, col))
                  sys.exit(1)
              if "jsonxs" not in col and "tpl" not in col:
                  sys.stderr.write("You need to specify 'jsonxs' or 'tpl' "
                                   "for custom column {}\n".format(col))
                  sys.exit(1)
  
      return cust_cols
docs: Load custom column definitions.