code: def test_cal_sam_minute(self):
      # test the correctness of the code
      random_n = 1000
      regions = [REG_CN, REG_US, REG_TW]
  
      def gen_args(cal: List):
          for time in np.random.choice(
              cal, size=random_n, replace=True
          ):
              sam_minutes = np.random.choice([1, 2, 3, 4, 5, 6])
              dt = pd.Timestamp(
                  datetime(
                      2021,
                      month=3,
                      day=3,
                      hour=time.hour,
                      minute=time.minute,
                      second=time.second,
                      microsecond=time.microsecond,
                  )
              )
              args = dt, sam_minutes
              yield args
  
      for region in regions:
          cal_time = get_min_cal(region=region)
          for args in gen_args(cal_time):
              assert cal_sam_minute(
                  *args, region
              ) == cal_sam_minute_new(*args, region=region)
  
          # test the performance of the code
          args_l = list(gen_args(cal_time))
  
          with TimeInspector.logt():
              for args in args_l:
                  cal_sam_minute(*args, region=region)
  
          with TimeInspector.logt():
              for args in args_l:
                  cal_sam_minute_new(*args, region=region)
  
file_path: qlib/tests/misc/test_utils.py
imports: from typing import List
  from unittest.case import TestCase
  import unittest
  import pandas
  import numpy
  from datetime import datetime
  from qlib import init
  from qlib.config import C
  from qlib.log import TimeInspector
  from qlib.constant import REG_CN, REG_US, REG_TW
  from qlib.utils.time import cal_sam_minute, get_min_cal, CN_TIME, US_TIME, TW_TIME
label_desc: Use image node_id 2 for calling the TimeUtils obj's underlying member method code with example usage: obj.test_cal_sam_minute() without return types