import ast


def validate_python_file(filename):
    """ Determine if a Python file is valid

    Args:
        filename (:obj:`str`): path to Python file

    Returns:
        :obj:`tuple`:

            * nested :obj:`list` of :obj:`str`: nested list of errors
            * nested :obj:`list` of :obj:`str`: nested list of warnings
    """
    try:
        with open(filename, 'rb') as file:
            ast.parse(file.read())
        return [], []
    except ValueError as exception:
        return [[str(exception)]], []