def check_campus(department_name, department_dict, val):
    """
    Returns the campus/college the given 'department_name' is in
    depending on the value of the 'val' parameter

    @params

        'department_name': The full name of the department to search for

        'department_dict': The dictionary of department information to search through

        'val': Can either be 'Campus' or 'College', used to determine which value
               to return

    Returns
    
        The campus or college the given 'department_name' is in
    """
    # for [c] -> campus, [college] -> Colleges in Campus
    for c, college in department_dict.items():
        for col_name, deps in college.items():
            for dep_a, dep_f in deps.items():
                if val == 'Campus':
                    if dep_f == department_name:
                        return c
                elif val == 'College':
                    if dep_f == department_name or dep_a == department_name:
                        return col_name