code: def construct_yaml_timestamp(self, node):
      value = self.construct_scalar(node)
      match = self.timestamp_regexp.match(node.value)
      values = match.groupdict()
      year = int(values["year"])
      month = int(values["month"])
      day = int(values["day"])
      if not values["hour"]:
          return datetime.date(year, month, day)
      hour = int(values["hour"])
      minute = int(values["minute"])
      second = int(values["second"])
      fraction = 0
      tzinfo = None
      if values["fraction"]:
          fraction = values["fraction"][:6]
          while len(fraction) < 6:
              fraction += "0"
          fraction = int(fraction)
      if values["tz_sign"]:
          tz_hour = int(values["tz_hour"])
          tz_minute = int(values["tz_minute"] or 0)
          delta = datetime.timedelta(hours=tz_hour, minutes=tz_minute)
          if values["tz_sign"] == "-":
              delta = -delta
          tzinfo = datetime.timezone(delta)
      elif values["tz"]:
          tzinfo = datetime.timezone.utc
      return datetime.datetime(
          year,
          month,
          day,
          hour,
          minute,
          second,
          fraction,
          tzinfo=tzinfo,
      )
  
imports: from .error import *
  from .nodes import *
  import collections.abc, datetime, base64, binascii, re, sys, types
label_desc: Use image node_id 9 for calling the SafeConstructor obj's underlying member method code with example usage: obj.construct_yaml_timestamp(node) and returns: datetime, datetime