code: def list_or_args(keys: KeysT, args: Tuple[KeyT, ...]) -> List[KeyT]:
      # returns a single new list combining keys and args
      try:
          iter(keys)
          # a string or bytes instance can be iterated, but indicates
          # keys wasn't passed as a list
          if isinstance(keys, (bytes, str)):
              keys = [keys]
          else:
              keys = list(keys)
      except TypeError:
          keys = [keys]
      if args:
          keys.extend(args)
      return keys
  
file_path: catboost/contrib/python/redis/py3/redis/commands/helpers.py
imports: import copy
  import random
  import string
  from typing import List, Tuple
  import redis
  from redis.typing import KeysT, KeyT
label_desc: Use image node_id 1 for calling a global function with example usage: list_or_args(keys, args) and returns: keys