import re


def extract_path_from_key(key):
    """
    Extracts the path from a block key.
    Args:
        key(str): Block key
    Returns:
        path: Path of the file the block belongs to
    """
    path_pattern = re.compile(r"^(.+)\-\d+$")
    return path_pattern.findall(key)[0]