human
check whether a file exists
assistant
Here is some code to check whether file "/path/to/file" exists

my_file = Path('/path/to/file')
if my_file.is_file():
    pass

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.