code: def test_ops(self):
      sd1 = idd.SingleData([1, 2, 3, 4], index=["foo", "bar", "f", "g"])
      sd2 = idd.SingleData([1, 2, 3, 4], index=["foo", "bar", "f", "g"])
      print(sd1 + sd2)
      new_sd = sd2 * 2
      self.assertTrue(new_sd.index == sd2.index)
  
      sd1 = idd.SingleData(
          [1, 2, None, 4], index=["foo", "bar", "f", "g"]
      )
      sd2 = idd.SingleData(
          [1, 2, 3, None], index=["foo", "bar", "f", "g"]
      )
      self.assertTrue(np.isnan((sd1 + sd2).iloc[3]))
      self.assertTrue(sd1.add(sd2).sum() == 13)
  
      self.assertTrue(
          idd.sum_by_index([sd1, sd2], sd1.index, fill_value=0.0).sum()
          == 13
      )
  
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 5 for calling the IndexDataTest obj's underlying member method code with example usage: obj.test_ops() without return types