def METHOD_NAME(filename):
    retval = 1
    try:
        # Try and stat the file. If it does not exist then OSError is raised.
        a = os.stat(filename)
    except OSError:
        retval = 0
    return retval