code: def elapsed_time(date_1, date_2, dtype):
      """Computes elapsed time between two date tensors."""
      days_in_year = 365.0
      return tf.cast(date_1.days_until(date_2), dtype=dtype) / (
          days_in_year
      )
  
imports: import enum
  from typing import Optional
  import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance import types
  from tf_quant_finance import utils
label_desc: Use image node_id 1 for calling a global function with example usage: elapsed_time(date_1, date_2, dtype) and returns: unknown