def parse_file(path, format=None, encoding='<STR_LIT:utf-8>', force_types=True):
try:<EOL><INDENT>with open(path, '<STR_LIT:rb>') as f:<EOL><INDENT>return parse(f, format, encoding, force_types)<EOL><DEDENT><DEDENT>except EnvironmentError as e:<EOL><INDENT>raise AnyMarkupError(e, traceback.format_exc())<EOL><DEDENT>
A convenience wrapper of parse, which accepts path of file to parse.

    Args:
        path: path to file to parse
        format: explicitly override the guessed `inp` markup format
        encoding: file encoding, defaults to utf-8
        force_types:
            if `True`, integers, floats, booleans and none/null
                are recognized and returned as proper types instead of strings;
            if `False`, everything is converted to strings
            if `None`, backend return value is used
    Returns:
        parsed `inp` (dict or list) containing unicode values
    Raises:
        AnyMarkupError if a problem occurs while parsing