<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nodes_with_role(rolename):
 """Configures a list of nodes that have the given role in their run list"""

    nodes = [n['name'] for n in
             lib.get_nodes_with_role(rolename, env.chef_environment)]
    if not len(nodes):
        print("No nodes found with role '{0}'".format(rolename))
        sys.exit(0)
    return node(*nodes)