def _get_node(lb, node_id=None, address=None, port=None):
 for node in getattr(lb, 'nodes', []):
  match_list = []
  if (node_id is not None):
   match_list.append((getattr(node, 'id', None) == node_id))
  if (address is not None):
   match_list.append((getattr(node, 'address', None) == address))
  if (port is not None):
   match_list.append((getattr(node, 'port', None) == port))
  if (match_list and all(match_list)):
   return node
 return None

def _get_node ( lb , node_id = None , address = None , port = None ) : for node in getattr ( lb , 'nodes' , [ ] ) : match_list = [ ] if ( node_id is not None ) : match_list . append ( ( getattr ( node , 'id' , None ) == node_id ) ) if ( address is not None ) : match_list . append ( ( getattr ( node , 'address' , None ) == address ) ) if ( port is not None ) : match_list . append ( ( getattr ( node , 'port' , None ) == port ) ) if ( match_list and all ( match_list ) ) : return node return None
helper function that returns all information about a named node .