def METHOD_NAME(file: str) -> None:
    """Replace all occurrences of "bdes_ident" with "bsls_ident" in the
    specified `file`.
    Args:
        file (str): an absolute or relative path to a file
    Returns:
        None
    """
    with open(file, "r+b") as f, mm_mmap(f.fileno(), 0) as filemap:
        regex = b'(?P<LOWER_CASE>bdes_ident)|(?P<UPPER_CASE>BDES_IDENT)'
        compiled_regex = re_compile(regex)
        # mmap objects satisfy the bytearray interface
        filemap_bytearray = ty_cast(bytearray, filemap)
        for match in re_finditer(compiled_regex, filemap_bytearray):
            group = match.lastgroup
            if group == 'LOWER_CASE':
                filemap[match.start():match.end()] = b'bsls_ident'
            else:
                assert group == 'UPPER_CASE'
                filemap[match.start():match.end()] = b'BSLS_IDENT'
        filemap.flush()