code: def _convert_strptime_to_regex(strptime_str: Text) -> Text:
      """Converts a string that includes strptime directives to a regex.
  
      Args:
        strptime_str: A string that includes strptime directives.
  
      Returns:
        A string that copies strptime_str but has the any directives in
          _STRPTIME_TO_RE replaced with their corresponding regexes.
      """
  
      def _get_replacement_regex(matchobj):
          return _STRPTIME_TO_RE[matchobj.group(0)]
  
      all_directives_re = re.compile("|".join(_STRPTIME_TO_RE))
      return re.sub(
          all_directives_re, _get_replacement_regex, strptime_str
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import calendar
  import collections
  import re
  import numpy
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import array_util
  from typing import Iterable, Pattern, Text, Tuple
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_strptime_to_regex(strptime_str) and returns: re, _STRPTIME_TO_RE