@classmethod
  def get_host_with_role(cls, keyname, role):
    """Searches through the local metadata to see which virtual machine runs the
    specified role.

    Args:
      keyname: The SSH keypair name that uniquely identifies this AppScale
        deployment.
      role: A str indicating the role to search for.
    Returns:
      A str containing the host that runs the specified service.
    """
    nodes = cls.get_local_nodes_info(keyname)
    for node in nodes:
      if node['jobs'] in role:
        return node['public_ip']
    raise AppScaleException("Couldn't find a {0} node.".format(role))
dataset/ETHPy150Open AppScale/appscale-tools/lib/local_state.py/LocalState.get_host_with_role/swapped operands of `in`