def METHOD_NAME(offset: Optional[str]) -> relativedelta:
    """Parse the offset to time delta.
    Args:
        offset (Optional[str]): Offset that is used for target date calcluation.
    Raises:
        ValueError: If an offset is provided in a unrecognizable format.
        ValueError: If an invalid offset unit is provided.
    Returns:
        reletivedelta: Time delta representation of the time offset.
    """
    if offset is None:
        return None
    unit_match = re.fullmatch(UNIT_RE, offset)
    if not unit_match:
        raise ValueError(
            f"[{offset}] is not in a valid offset format. "
            "Please pass a valid offset e.g '1 day'."
        )
    multiple, unit = unit_match.groups()
    if unit not in VALID_UNITS:
        raise ValueError(f"[{unit}] is not a valid offset unit. Supported units: {VALID_UNITS}")
    shift_args = {f"{unit}s": -int(multiple)}
    return relativedelta(**shift_args)