def get_head_node(self, nodes):
    """ Retrieve a node with the 'shadow' role.

    Args:
      nodes: A list of nodes in the running AppScale deployment.
    Returns:
      A string containing the IP address of the head node.
    """
    for node in nodes:
      if node['jobs'] in 'shadow':
        return node['public_ip']

    raise AppScaleException('Unable to find head node.')
dataset/ETHPy150Open AppScale/appscale-tools/lib/appscale.py/AppScale.get_head_node/swapped operands of `in`