code: def as_parameter(param: tp.Any) -> Parameter:
      """Returns a Parameter from anything:
      either the input if it is already a parameter, or a Constant if not
      This is convenient for iterating over Parameter and other objects alike
      """
      if isinstance(param, Parameter):
          return param
      else:
          return Constant(param)
  
imports: import uuid
  import warnings
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from .None import utils
  from ._layering import ValueProperty
  from ._layering import Layered
  from ._layering import Level
label_desc: Use image node_id 2 for calling a global function with example usage: as_parameter(param) and returns: param, Constant