Fetches the latest graph series for a client label from the DB.

  Args:
    label: Client label to fetch data for.
    report_type: rdf_stats.ClientGraphSeries.ReportType to fetch data for.
    token: ACL token to use for reading from the legacy (non-relational)
      datastore.

  Raises:
    AFF4AttributeTypeError: If, when reading to the legacy DB, an unexpected
    report-data type is encountered.

  Returns:
    The graph series for the given label and report type that was last
    written to the DB, or None if no series for that label and report-type
    exist.

def FetchMostRecentGraphSeries(label,
                               report_type,
                               token = None
                              ):
  """Fetches the latest graph series for a client label from the DB.

  Args:
    label: Client label to fetch data for.
    report_type: rdf_stats.ClientGraphSeries.ReportType to fetch data for.
    token: ACL token to use for reading from the legacy (non-relational)
      datastore.

  Raises:
    AFF4AttributeTypeError: If, when reading to the legacy DB, an unexpected
    report-data type is encountered.

  Returns:
    The graph series for the given label and report type that was last
    written to the DB, or None if no series for that label and report-type
    exist.
  """
  if _ShouldUseLegacyDatastore():
    return _FetchMostRecentGraphSeriesFromTheLegacyDB(
        label, report_type, token=token)

  return data_store.REL_DB.ReadMostRecentClientGraphSeries(label, report_type)