code: def test_repr(setup):
      # test tensor repr
      with np.printoptions(threshold=100):
          arr = np.random.randint(1000, size=(11, 4, 13))
  
          t = mt.tensor(arr, chunk_size=3)
  
          result = repr(t.execute())
          expected = repr(arr)
          assert result == expected
  
      for size in (5, 58, 60, 62, 64):
          pdf = pd.DataFrame(np.random.randint(1000, size=(size, 10)))
  
          # test DataFrame repr
          df = md.DataFrame(pdf, chunk_size=size // 2)
  
          result = repr(df.execute())
          expected = repr(pdf)
          assert result == expected
  
          # test DataFrame _repr_html_
          result = df.execute()._repr_html_()
          expected = pdf._repr_html_()
          assert result == expected
  
          # test Series repr
          ps = pdf[0]
          s = md.Series(ps, chunk_size=size // 2)
  
          result = repr(s.execute())
          expected = repr(ps)
          assert result == expected
  
      # test Index repr
      pind = pd.date_range("2020-1-1", periods=10)
      ind = md.Index(pind, chunk_size=5)
  
      assert "DatetimeIndex" in repr(ind.execute())
  
      # test groupby repr
      df = md.DataFrame(
          pd.DataFrame(np.random.rand(100, 3), columns=list("abc"))
      )
      grouped = df.groupby(["a", "b"]).execute()
  
      assert "DataFrameGroupBy" in repr(grouped)
  
      # test Categorical repr
      c = md.qcut(range(5), 3)
      assert "Categorical" in repr(c)
      assert "Categorical" in str(c)
      assert repr(c.execute()) == repr(pd.qcut(range(5), 3))
  
imports: import io
  import os
  import re
  import sys
  import tempfile
  from collections import namedtuple
  import numpy
  import pandas
  import pytest
  from ..None import tensor
  from ..None import dataframe
  from ..None import remote
  from ..config import option_context
  from ..deploy.utils import load_service_config_file
  from ..session import execute, fetch, fetch_log
label_desc: Use image node_id 10 for calling a global function with example usage: test_repr(setup) without return types