code: def get_daycount_fraction(date_start, date_end, convention, dtype):
      """Return the day count fraction between two dates."""
      if convention == DayCountConvention.ACTUAL_365:
          return dates.daycount_actual_365_fixed(
              start_date=date_start, end_date=date_end, dtype=dtype
          )
      elif convention == DayCountConvention.ACTUAL_360:
          return dates.daycount_actual_360(
              start_date=date_start, end_date=date_end, dtype=dtype
          )
      elif convention == DayCountConvention.THIRTY_360_ISDA:
          return dates.daycount_thirty_360_isda(
              start_date=date_start, end_date=date_end, dtype=dtype
          )
      else:
          raise ValueError("Daycount convention not implemented.")
  
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 2 for calling a global function with example usage: get_daycount_fraction(date_start, date_end, convention, dtype) and returns: dates, dates, dates