code: def test_dataframe_and_scalar(setup, func_name, func_opts):
      if func_opts.func_name in ["__and__", "__or__", "__xor__"]:
          # FIXME bitwise logical operators doesn\'t support floating point scalars
          return
  
      # test dataframe and scalar
      pdf = pd.DataFrame(np.random.rand(10, 10))
      pdf = to_boolean_if_needed(func_opts.func_name, pdf)
      df = from_pandas(pdf, chunk_size=2)
      expected = func_opts.func(pdf, 1)
      result = func_opts.func(df, 1).execute().fetch()
      pd.testing.assert_frame_equal(expected, result)
      result2 = func_opts.func(df, 1).execute().fetch()
      pd.testing.assert_frame_equal(expected, result2)
      result3 = getattr(df, func_opts.func_name)(1).execute().fetch()
      pd.testing.assert_frame_equal(expected, result3)
  
      # test scalar and dataframe
      result4 = func_opts.func(df, 1).execute().fetch()
      pd.testing.assert_frame_equal(expected, result4)
  
      expected2 = func_opts.func(1, pdf)
      result5 = func_opts.func(1, df).execute().fetch()
      pd.testing.assert_frame_equal(expected2, result5)
  
      result6 = getattr(df, func_opts.rfunc_name)(1).execute().fetch()
      pd.testing.assert_frame_equal(expected2, result6)
  
      # test pandas series and dataframe
      pdf2 = pd.DataFrame(np.random.rand(10, 10))
      expected = func_opts.func(pdf2, pdf)
      result = func_opts.func(pdf2, df).execute().fetch()
      pd.testing.assert_frame_equal(expected, result)
  
imports: import operator
  from dataclasses import dataclass
  from functools import partial
  from typing import Callable, Union
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....tensor.datasource import array
  from ....utils import dataslots
  from ...None import to_datetime
  from ...datasource.dataframe import from_pandas
  from ...datasource.series import from_pandas
  from ..tests.test_arithmetic import comp_func
label_desc: Use image node_id 13 for calling a global function with example usage: test_dataframe_and_scalar(setup, func_name, func_opts) without return types