code: def cast_value(value: Any) -> Optional[Value]:
      from neptune.handler import Handler
  
      from_stringify_value = False
      if is_stringify_value(value):
          from_stringify_value, value = True, value.value
  
      if isinstance(value, Value):
          return value
      elif isinstance(value, Handler):
          return ValueCopy(value)
      elif isinstance(value, argparse.Namespace):
          return Namespace(vars(value))
      elif File.is_convertable_to_image(value):
          return File.as_image(value)
      elif File.is_convertable_to_html(value):
          return File.as_html(value)
      elif is_bool(value):
          return Boolean(value)
      elif is_int(value):
          return Integer(value)
      elif is_float(value):
          return Float(value)
      elif is_string(value):
          return String(value)
      elif isinstance(value, datetime):
          return Datetime(value)
      elif is_float_like(value):
          return Float(value)
      elif is_dict_like(value):
          return Namespace(value)
      elif from_stringify_value:
          return String(str(value))
  
file_path: neptune-client/src/neptune/types/type_casting.py
imports: import argparse
  from datetime import datetime
  from typing import Any, Collection, Optional, Union
  from neptune.internal.types.stringify_value import StringifyValue
  from neptune.internal.utils import is_bool, is_dict_like, is_float, is_float_like, is_int, is_string, is_stringify_value
  from neptune.types import Boolean, File, Integer
  from neptune.types.atoms.datetime import Datetime
  from neptune.types.atoms.float import Float
  from neptune.types.atoms.string import String
  from neptune.types.namespace import Namespace
  from neptune.types.series import FileSeries, FloatSeries, StringSeries
  from neptune.types.series.series import Series
  from neptune.types.value import Value
  from neptune.types.value_copy import ValueCopy
label_desc: Use image node_id 1 for calling a global function with example usage: cast_value(value) and returns: value, ValueCopy, Namespace, File, File, Boolean, Integer, Float, String, Datetime, Float, Namespace, String