code: def test_from_dataframe_execution(setup):
      mdf = md.DataFrame(
          {"angle": [0, 3, 4], "degree": [360, 180, 360]},
          index=["circle", "triangle", "rectangle"],
      )
      tensor_result = from_dataframe(mdf).execute().fetch()
      tensor_expected = (
          mt.tensor([[0, 360], [3, 180], [4, 360]]).execute().fetch()
      )
      np.testing.assert_equal(tensor_result, tensor_expected)
  
      # test up-casting
      mdf2 = md.DataFrame({"a": [0.1, 0.2, 0.3], "b": [1, 2, 3]})
      tensor_result2 = from_dataframe(mdf2).execute().fetch()
      np.testing.assert_equal(
          tensor_result2[0].dtype, np.dtype("float64")
      )
      tensor_expected2 = (
          mt.tensor([[0.1, 1.0], [0.2, 2.0], [0.3, 3.0]])
          .execute()
          .fetch()
      )
      np.testing.assert_equal(tensor_result2, tensor_expected2)
  
      raw = [[0.1, 0.2, 0.4], [0.4, 0.7, 0.3]]
      mdf3 = md.DataFrame(raw, columns=list("abc"), chunk_size=2)
      tensor_result3 = from_dataframe(mdf3).execute().fetch()
      np.testing.assert_array_equal(tensor_result3, np.asarray(raw))
      assert tensor_result3.flags["F_CONTIGUOUS"] is True
      assert tensor_result3.flags["C_CONTIGUOUS"] is False
  
      # test from series
      series = md.Series([1, 2, 3])
      tensor_result = series.to_tensor().execute().fetch()
      np.testing.assert_array_equal(tensor_result, np.array([1, 2, 3]))
  
      series = md.Series(range(10), chunk_size=3)
      tensor_result = series.to_tensor().execute().fetch()
      np.testing.assert_array_equal(tensor_result, np.arange(10))
  
      # test from index
      index = md.Index(
          pd.MultiIndex.from_tuples([(0, 1), (2, 3), (4, 5)])
      )
      tensor_result = (
          index.to_tensor(extract_multi_index=True).execute().fetch()
      )
      np.testing.assert_array_equal(
          tensor_result, np.arange(6).reshape((3, 2))
      )
  
      index = md.Index(
          pd.MultiIndex.from_tuples([(0, 1), (2, 3), (4, 5)])
      )
      tensor_result = (
          index.to_tensor(extract_multi_index=False).execute().fetch()
      )
      np.testing.assert_array_equal(
          tensor_result,
          pd.MultiIndex.from_tuples(
              [(0, 1), (2, 3), (4, 5)]
          ).to_series(),
      )
  
imports: import tempfile
  import shutil
  import os
  import time
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....None import dataframe
  from ....lib.sparse import SparseNDArray
  from ....tests.core import require_cupy
  from ....utils import lazy_import
  from ...lib import nd_grid
  from ..None import tensor, ones_like, zeros, zeros_like, full, full_like, arange, empty, empty_like, diag, diagflat, eye, linspace, meshgrid, indices, triu, tril, from_dataframe, fromtiledb, fromhdf5, fromzarr
label_desc: Use image node_id 17 for calling a global function with example usage: test_from_dataframe_execution(setup) without return types