from typing import Union
import re


def normalize_unalloc_files(path_str: Union[str, None]) -> Union[str, None]:
    """
    Normalizes a path string removing timestamps from unalloc files.
    Args:
        path_str: The original path string.

    Returns: The path string where timestamps are removed from unalloc strings.

    """
    # takes a file name like "Unalloc_30580_7466496_2980941312" and removes the object id to become
    # "Unalloc_7466496_2980941312"
    return None if path_str is None else re.sub('Unalloc_[0-9]+_', 'Unalloc_', path_str)