def METHOD_NAME(datetime_str: str) -> datetime.datetime:
    """Parse an ISO-8601-like datestring into a datetime.
    Parameters
    ----------
    datetime_str : str
        The date string to parse.
    Returns
    -------
    datetime.datetime
        The corresponding date time.
    """
    if datetime_str.endswith(("z", "Z")):
        # Python's parser cannot handle zulu time, it isn't a proper ISO-8601 compliant parser.
        datetime_str = datetime_str[:-1] + "+00:00"
    return datetime.datetime.fromisoformat(datetime_str)