nodes: 0, module; 1, function_definition; 2, function_name:nodes; 3, parameters; 4, block; 5, identifier:self; 6, keyword_separator; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, return_statement; 15, identifier:dc; 16, None; 17, identifier:near; 18, None; 19, identifier:watch; 20, None; 21, identifier:consistency; 22, None; 23, comment:"""Lists nodes in a given DC
  
          Parameters:
              dc (str): Specify datacenter that will be used.
                        Defaults to the agent's local datacenter.
              near (str): Sort the node list in ascending order based on the
                          estimated round trip time from that node.
              watch (Blocking): Do a blocking query
              consistency (Consistency): Force consistency
          Returns:
              CollectionMeta: where value is a list
  
          It returns a body like this::
  
              [
                {
                  "Node": "baz",
                  "Address": "10.1.10.11",
                  "TaggedAddresses": {
                    "lan": "10.1.10.11",
                    "wan": "10.1.10.11"
                  }
                },
                {
                  "Node": "foobar",
                  "Address": "10.1.10.12",
                  "TaggedAddresses": {
                    "lan": "10.1.10.11",
                    "wan": "10.1.10.12"
                  }
                }
              ]
          """; 24, assignment; 25, assignment; 26, call; 27, identifier:params; 28, dictionary; 29, identifier:response; 30, await; 31, identifier:consul; 32, argument_list; 33, pair; 34, pair; 35, call; 36, identifier:response; 37, string:"dc"; 38, identifier:dc; 39, string:"near"; 40, identifier:near; 41, attribute; 42, argument_list; 43, attribute; 44, identifier:get; 45, string:"/v1/catalog/nodes"; 46, keyword_argument; 47, keyword_argument; 48, keyword_argument; 49, identifier:self; 50, identifier:_api; 51, identifier:params; 52, identifier:params; 53, identifier:watch; 54, identifier:watch; 55, identifier:consistency; 56, identifier:consistency
code: async def nodes(self, *,
                      dc=None, near=None, watch=None, consistency=None):
          """Lists nodes in a given DC
  
          Parameters:
              dc (str): Specify datacenter that will be used.
                        Defaults to the agent's local datacenter.
              near (str): Sort the node list in ascending order based on the
                          estimated round trip time from that node.
              watch (Blocking): Do a blocking query
              consistency (Consistency): Force consistency
          Returns:
              CollectionMeta: where value is a list
  
          It returns a body like this::
  
              [
                {
                  "Node": "baz",
                  "Address": "10.1.10.11",
                  "TaggedAddresses": {
                    "lan": "10.1.10.11",
                    "wan": "10.1.10.11"
                  }
                },
                {
                  "Node": "foobar",
                  "Address": "10.1.10.12",
                  "TaggedAddresses": {
                    "lan": "10.1.10.11",
                    "wan": "10.1.10.12"
                  }
                }
              ]
          """
          params = {"dc": dc, "near": near}
          response = await self._api.get("/v1/catalog/nodes",
                                         params=params,
                                         watch=watch,
                                         consistency=consistency)
          return consul(response)