import json


def open_file(file: str) -> dict:
    """Open the file, if present, if not, return an empty dict."""
    try:
        with open(file) as f:
            return json.load(f)
    except FileNotFoundError:
        return {}