code: def test_squeeze(self):
      sd1 = idd.SingleData([1, 2, 3, 4], index=["foo", "bar", "f", "g"])
      # automatically squeezing
      self.assertTrue(not isinstance(np.nansum(sd1), idd.IndexData))
      self.assertTrue(not isinstance(np.sum(sd1), idd.IndexData))
      self.assertTrue(not isinstance(sd1.sum(), idd.IndexData))
      self.assertEqual(np.nansum(sd1), 10)
      self.assertEqual(np.sum(sd1), 10)
      self.assertEqual(sd1.sum(), 10)
      self.assertEqual(np.nanmean(sd1), 2.5)
      self.assertEqual(np.mean(sd1), 2.5)
      self.assertEqual(sd1.mean(), 2.5)
  
file_path: qlib/tests/misc/test_index_data.py
imports: import numpy
  import pandas
  import qlib.utils.index_data
  import unittest
label_desc: Use image node_id 7 for calling the IndexDataTest obj's underlying member method code with example usage: obj.test_squeeze() without return types