def get_nm_node(nm_host, hostname=None, node_id=None, nodenames=None):
    "\n    Return a dict of information about a node\n    in NM, by either name or ID. If nodename is specified,\n    it will be resolved to the id.\n\n    nodenames, if specified, is the output dict from get_node_names();\n    if it is not specified, get_node_names() will be called internally.\n\n    :param nm_host: NodeMeister hostname/IP\n    :type nm_host: string\n    :param hostname: name of node to get\n    :type hostname: string\n    :param node_id: ID of node to get, overrides hostname\n    :type node_id: int\n    :param nodenames: output of get_node_names(), to prevent calling it again if we already have it\n    :type nodenames: dict\n    :rtype: dict\n    :returns: unserialized JSON dict representing the specified group, of the form:\n      {'hostname': <string>, 'parameters': [<param IDs>], 'classes': [<class IDs>], 'parents': [<group IDs>],\n      'groups': [<group IDs>], 'id': <int>, 'description': <string>}\n    "
    if ((node_id is None) and (hostname is None)):
        raise ValueError('get_nm_node called without hostname or node_id')
    if (node_id is None):
        if (nodenames is None):
            nodenames = get_node_names(nm_host)
        for n in nodenames:
            if (nodenames[n] == hostname):
                node_id = n
        if (node_id is None):
            logger.error('could not find hode with hostname {h}'.format(h=hostname))
            return {}
    j = get_json(('http://%s/enc/nodes/%d/' % (nm_host, node_id)))
    return j
Return a dict of information about a node
in NM, by either name or ID. If nodename is specified,
it will be resolved to the id.

nodenames, if specified, is the output dict from get_node_names();
if it is not specified, get_node_names() will be called internally.

:param nm_host: NodeMeister hostname/IP
:type nm_host: string
:param hostname: name of node to get
:type hostname: string
:param node_id: ID of node to get, overrides hostname
:type node_id: int
:param nodenames: output of get_node_names(), to prevent calling it again if we already have it
:type nodenames: dict
:rtype: dict
:returns: unserialized JSON dict representing the specified group, of the form:
  {'hostname': <string>, 'parameters': [<param IDs>], 'classes': [<class IDs>], 'parents': [<group IDs>],
  'groups': [<group IDs>], 'id': <int>, 'description': <string>}
def get_nm_node(nm_host, hostname=None, node_id=None, nodenames=None):
    "\n    Return a dict of information about a node\n    in NM, by either name or ID. If nodename is specified,\n    it will be resolved to the id.\n\n    nodenames, if specified, is the output dict from get_node_names();\n    if it is not specified, get_node_names() will be called internally.\n\n    :param nm_host: NodeMeister hostname/IP\n    :type nm_host: string\n    :param hostname: name of node to get\n    :type hostname: string\n    :param node_id: ID of node to get, overrides hostname\n    :type node_id: int\n    :param nodenames: output of get_node_names(), to prevent calling it again if we already have it\n    :type nodenames: dict\n    :rtype: dict\n    :returns: unserialized JSON dict representing the specified group, of the form:\n      {'hostname': <string>, 'parameters': [<param IDs>], 'classes': [<class IDs>], 'parents': [<group IDs>],\n      'groups': [<group IDs>], 'id': <int>, 'description': <string>}\n    "
    if ((node_id is None) and (hostname is None)):
        raise ValueError('get_nm_node called without hostname or node_id')
    if (node_id is None):
        if (nodenames is None):
            nodenames = get_node_names(nm_host)
        for n in nodenames:
            if (nodenames[n] == hostname):
                node_id = n
        if (node_id is None):
            logger.error('could not find hode with hostname {h}'.format(h=hostname))
            return {}
    j = get_json(('http://%s/enc/nodes/%d/' % (nm_host, node_id)))
    return j