@staticmethod
def _find_file(filename, dir):
    "Find a file at an absolute or relative location.\n\n        - First tries ``Path(filename)``\n        - Second tries ``Path(dir) / filename``\n        - Raises ``OSError`` if both don't exist.\n        "
    path1 = make_path(filename)
    path2 = (make_path(dir) / filename)
    if path1.is_file():
        filename = path1
    elif path2.is_file():
        filename = path2
    else:
        raise OSError('File not found at {} or {}'.format(path1, path2))
    return filename
Find a file at an absolute or relative location.

- First tries ``Path(filename)``
- Second tries ``Path(dir) / filename``
- Raises ``OSError`` if both don't exist.
@staticmethod
def _find_file(filename, dir):
    "Find a file at an absolute or relative location.\n\n        - First tries ``Path(filename)``\n        - Second tries ``Path(dir) / filename``\n        - Raises ``OSError`` if both don't exist.\n        "
    path1 = make_path(filename)
    path2 = (make_path(dir) / filename)
    if path1.is_file():
        filename = path1
    elif path2.is_file():
        filename = path2
    else:
        raise OSError('File not found at {} or {}'.format(path1, path2))
    return filename