code: def _to_np_datetimes(nested_date_tuples):
      def recursive_convert_to_datetimes(sequence):
          result = []
          for item in sequence:
              if isinstance(item, list):
                  result.append(recursive_convert_to_datetimes(item))
              else:
                  result.append(datetime.date(*item))
          return result
  
      return np.array(
          recursive_convert_to_datetimes(nested_date_tuples),
          dtype=np.datetime64,
      )
  
file_path: tf-quant-finance/tf_quant_finance/datetime/schedules_test.py
imports: import datetime
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.datetime import test_data
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: _to_np_datetimes(nested_date_tuples) and returns: np, result