def valid_path(path):
    """ Determine if a path is deemed "valid". This means we are looking for real partitions (not kernel devices)
    and mounted partitions.

    :param path: Usually named tuple returned from psutil.disk_partitions()
    :type path: namedtuple
    :return: Valid path state
    :rtype: bool
    """
    bad_prefix = ['/sys', '/dev', '/proc', '/run', '/tmp']
    if hasattr(path, "mountpoint"):
        path = path.mountpoint
    return not any(path.startswith(prefix) for prefix in bad_prefix)