code: def from_float(v: float) -> torch.Tensor:
      return torch.tensor(v).float()
  
imports: import contextlib
  from typing import Optional, Type, Union
  import pytest
  import torch
  from marshmallow import ValidationError
  from ludwig.features.category_feature import CategoryOutputFeature
  from ludwig.features.set_feature import SetOutputFeature
  from ludwig.features.text_feature import TextOutputFeature
  from ludwig.modules import loss_modules
  from ludwig.schema.features.loss.loss import BWCEWLossConfig, CORNLossConfig, HuberLossConfig, MAELossConfig, MAPELossConfig, MSELossConfig, RMSELossConfig, RMSPELossConfig, SigmoidCrossEntropyLossConfig, SoftmaxCrossEntropyLossConfig
  from ludwig.schema.model_config import ModelConfig
  from tests.integration_tests.utils import category_feature, set_feature, text_feature
label_desc: Use image node_id 1 for calling a global function with example usage: from_float(v) and returns: torch