code: def test_cast_format_locale(self):
      date_type = DateTime(
          datetime_format="%Y-%m-%d %I:%M %p", locale="ko_KR.UTF-8"
      )
  
      # Date formats depend on the platform's strftime/strptime implementation;
      # some platforms like macOS always return AM/PM for day periods (%p),
      # so we will catch any CastError that may arise from the conversion
      possible_values = (
          (
              "1994-03-01 12:30 오후",
              "2011-02-17 06:30 오전",
              None,
              "1984-01-05 06:30 오후",
              "n/a",
          ),
          (
              "1994-03-01 12:30 PM",
              "2011-02-17 06:30 AM",
              None,
              "1984-01-05 06:30 PM",
              "n/a",
          ),
      )
      valid = False
      exceptions = []
      for values in possible_values:
          try:
              casted = tuple(date_type.cast(v) for v in values)
          except CastError as e:
              exceptions.append(repr(e))
              continue
          self.assertSequenceEqual(
              casted,
              (
                  datetime.datetime(1994, 3, 1, 12, 30, 0),
                  datetime.datetime(2011, 2, 17, 6, 30, 0),
                  None,
                  datetime.datetime(1984, 1, 5, 18, 30, 0),
                  None,
              ),
          )
          valid = True
      if not valid:
          raise AssertionError("\n\n".join(exceptions))
  
imports: import datetime
  import pickle
  import unittest
  from decimal import Decimal
  import parsedatetime
  from agate.data_types import Boolean, Date, DateTime, Number, Text, TimeDelta
  from agate.exceptions import CastError
label_desc: Use image node_id 8 for calling the TestDateTime obj's underlying member method code with example usage: obj.test_cast_format_locale() without return types