code: def create_list_from_parameter_value(
      value: Union[object, List[object], None]
  ) -> list:
      """Encapsulates a given object in a list.
  
      Many methods can either take a single value, a list or None as input. Usually we want to iterate all given
      values. Therefore, this method ensures that a list is always returned.
  
      Args:
          value (Union[object, List[object], None])): The value that will be mapped onto a list representation.
  
      Returns:
          List[object]: Either an empty list or a list with all given objects.
  
      Examples:
          value = None    => []
          value = []      => []
          value = 5       => [5]
          value = [5,6]   => [5,6]
      """
      if not value:
          # => create empty list
          return []
      if not isinstance(value, list):
          # => create list with single value
          return [value]
      # => value is already a list
      return value
  
imports: import os
  import platform
  import socket
  import subprocess
  import sys
  from typing import Dict, List, Union
  import lazycluster.settings
  from .utils import Environment
label_desc: Use image node_id 2 for calling a global function with example usage: create_list_from_parameter_value(value) and returns: value, list, list