parameters: (value: Scalar)
return_statement: return value
docstring: If passed a scalar cast the scalar to a python native type.
  
      Parameters
      ----------
      value : scalar or Series
  
      Returns
      -------
      scalar or Series
docstring_summary: If passed a scalar cast the scalar to a python native type.
docstring_tokens: If passed a scalar cast the scalar to a python native type .
function: def maybe_box_native(value: Scalar) -> Scalar:
      """
      If passed a scalar cast the scalar to a python native type.
  
      Parameters
      ----------
      value : scalar or Series
  
      Returns
      -------
      scalar or Series
      """
      if is_float(value):
          # error: Argument 1 to "float" has incompatible type
          # "Union[Union[str, int, float, bool], Union[Any, Timestamp, Timedelta, Any]]";
          # expected "Union[SupportsFloat, _SupportsIndex, str]"
          value = float(value)  # type: ignore[arg-type]
      elif is_integer(value):
          # error: Argument 1 to "int" has incompatible type
          # "Union[Union[str, int, float, bool], Union[Any, Timestamp, Timedelta, Any]]";
          # expected "Union[str, SupportsInt, _SupportsIndex, _SupportsTrunc]"
          value = int(value)  # type: ignore[arg-type]
      elif is_bool(value):
          value = bool(value)
      elif isinstance(value, (np.datetime64, np.timedelta64)):
          value = maybe_box_datetimelike(value)
      return value
function_tokens: def maybe_box_native ( value : Scalar ) -> Scalar : if is_float ( value ) : # error: Argument 1 to "float" has incompatible type # "Union[Union[str, int, float, bool], Union[Any, Timestamp, Timedelta, Any]]"; # expected "Union[SupportsFloat, _SupportsIndex, str]" value = float ( value ) # type: ignore[arg-type] elif is_integer ( value ) : # error: Argument 1 to "int" has incompatible type # "Union[Union[str, int, float, bool], Union[Any, Timestamp, Timedelta, Any]]"; # expected "Union[str, SupportsInt, _SupportsIndex, _SupportsTrunc]" value = int ( value ) # type: ignore[arg-type] elif is_bool ( value ) : value = bool ( value ) elif isinstance ( value , ( np . datetime64 , np . timedelta64 ) ) : value = maybe_box_datetimelike ( value ) return value