def _cimdatetime_constructor(loader, node):
    """
    PyYAML constructor function for CIMDateTime objects.
    This is needed for yaml.safe_load() to support CIMDateTime.
    """
    cimdatetime_str = loader.construct_scalar(node)
    cimdatetime = CIMDateTime(cimdatetime_str)
    return cimdatetime