code: def _canonize_validator(current_validator):
      """
      Convert current_validator to a new list and return it.
  
      If current_validator is None return an empty list.
      If current_validator is a list, return a copy of it.
      If current_validator is another type of  iterable, return a list version of it.
      If current_validator is a single value, return a one-list containing it.
      """
  
      if not current_validator:
          return []
  
      if isinstance(current_validator, (list, tuple)):
          current_validator = list(current_validator)
      else:
          current_validator = [current_validator]
  
      return current_validator
  
file_path: clearml/clearml/task_parameters.py
imports: import six
  import attr
  from attr import validators
label_desc: Use image node_id 1 for calling a global function with example usage: _canonize_validator(current_validator) and returns: current_validator, list