code: def convert_to_tensor_or_dataframe(item):
      if isinstance(item, (DATAFRAME_TYPE, pd.DataFrame)):
          item = DataFrame(item)
      elif isinstance(item, (SERIES_TYPE, pd.Series)):
          item = Series(item)
      else:
          item = astensor(item)
      return item
  
imports: import math
  import numbers
  import warnings
  from typing import List
  import numpy
  import pandas
  from sklearn.base import BaseEstimator
  from ...None import options
  from ...core import enter_mode
  from ...typing import TileableType
  from ...dataframe import DataFrame, Series
  from ...dataframe.core import DATAFRAME_TYPE, SERIES_TYPE
  from ...tensor import tensor
  from ...utils import parse_readable_size
label_desc: Use image node_id 1 for calling a global function with example usage: convert_to_tensor_or_dataframe(item) and returns: item