def METHOD_NAME(namespace):
    import datetime
    DATE_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
    if namespace.expiration:
        try:
            namespace.expiration = datetime.datetime.strptime(namespace.expiration, DATE_TIME_FORMAT)
        except ValueError:
            raise CLIError("Input '{}' is not valid datetime. Valid example: 2025-12-31T12:59:59Z".format(
                namespace.expiration))