@pexdoc.pcontracts.new_contract(<EOL>argument_invalid="<STR_LIT>",<EOL>file_not_found=(OSError, "<STR_LIT>"),<EOL>)<EOL>def file_name_exists(obj):
exdesc = pexdoc.pcontracts.get_exdesc()<EOL>msg = exdesc["<STR_LIT>"]<EOL>if not isinstance(obj, str) or (isinstance(obj, str) and ("<STR_LIT>" in obj)):<EOL><INDENT>raise ValueError(msg)<EOL><DEDENT>try:<EOL><INDENT>os.path.exists(obj)<EOL><DEDENT>except (TypeError, ValueError):  <EOL><INDENT>raise ValueError(msg)<EOL><DEDENT>obj = _normalize_windows_fname(obj)<EOL>if not os.path.exists(obj):<EOL><INDENT>msg = exdesc["<STR_LIT>"]<EOL>raise ValueError(msg)<EOL><DEDENT>
r"""
    Validate if an object is a legal name for a file *and* that the file exists.

    :param obj: Object
    :type  obj: any

    :raises:
     * OSError (File *[fname]* could not be found). The
       token \*[fname]\* is replaced by the *value* of the
       argument the contract is attached to

     * RuntimeError (Argument \`*[argument_name]*\` is not valid).
       The token \*[argument_name]\* is replaced by the name of
       the argument the contract is attached to

    :rtype: None