code: def _convert_to_tensor(data):
      """This function can convert common data types (list, pandas.Series, numpy.ndarray, torch.Tensor) into torch.Tensor.
  
      Args:
          data (list, pandas.Series, numpy.ndarray, torch.Tensor): Origin data.
  
      Returns:
          torch.Tensor: Converted tensor from `data`.
      """
      elem = data[0]
      if isinstance(elem, (float, int, np.float, np.int64)):
          new_data = torch.as_tensor(data)
      elif isinstance(
          elem, (list, tuple, pd.Series, np.ndarray, torch.Tensor)
      ):
          seq_data = [torch.as_tensor(d) for d in data]
          new_data = rnn_utils.pad_sequence(seq_data, batch_first=True)
      else:
          raise ValueError(f"[{type(elem)}] is not supported!")
      if new_data.dtype == torch.float64:
          new_data = new_data.float()
      return new_data
  
imports: import numpy
  import pandas
  import torch
  import torch.nn.utils.rnn
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_tensor(data) and returns: new_data