human
Complete this python program:
def _accessible_courses_iter(request):
assistant
#Here is the Python program you requested.

    """List all courses available to the logged in user by iterating through all the courses.
    This method is only used by tests.
    """
    def course_filter(course):
        '\n                                Filter    out    unusable    and    inaccessible    courses\n                                '
        if isinstance(course, ErrorDescriptor):
            return False
        if isinstance(course.id, CCXLocator):
            return False
        if (course.location.course == 'templates'):
            return False
        return has_studio_read_access(request.user, course.id)
    courses = six.moves.filter(course_filter, modulestore().get_courses())
    in_process_course_actions = get_in_process_course_actions(request)
    return (courses, in_process_course_actions)