import re


def tokenize_datetime(text: str) -> str:
    """Tokenizes datetime to make it consistent with the seaweed tokens."""
    # 5.10 => 5 . 10
    # 4:00 => 4 : 00
    # 5/7 => 5 / 7
    # 5\7 => 5 \ 7
    # 3-9 => 3 - 9
    text = re.sub(r"(\d)([.:/\\-])(\d)", r"\1 \2 \3", text)

    # 4pm => 4 pm
    text = re.sub(r"(\d+)([a-zA-Z])", r"\1 \2", text)

    # safe guard to avoid multiple spaces
    text = re.sub(r"\s+", " ", text)
    return text