code: def coerce_int2list(value: int) -> List[int]:
      """Validator to coerce int to list (pydantic doesn't do this by default)."""
      if not isinstance(value, list):
          return [value]
      else:
          return value
  
file_path: alibi-detect/alibi_detect/saving/validators.py
imports: import sys
  from typing import Any, Generic, Optional, Type, TypeVar, Union, List
  import numpy
  from numpy.lib import NumpyVersion
  from pydantic.fields import ModelField
  from alibi_detect.utils.frameworks import has_tensorflow, has_pytorch, has_keops, Framework
label_desc: Use image node_id 1 for calling a global function with example usage: coerce_int2list(value) and returns: list, value