def get_blockname_from_block_id(lookup_dict: dict, block_id: str) -> str:
    """
    Pycifrw makes datablock names all lower case. When I make up a pd+block_id from a dataname, sometimes the user has a
    case-dependent reference somewhere in their CIF, and so I can't find the datablock. This looks in my lookup dictionary
    two ways to see if it can be found.
    :param lookup_dict: the dictionary mapping block_id to datablock
    :param block_id: the block id I want to match
    :return: the matching datablock name
    """
    try:
        return lookup_dict[block_id]
    except KeyError:
        return lookup_dict[block_id.lower()]