nodes: 0, module; 1, function_definition; 2, function_name:list_percelen_by_sectie; 3, parameters; 4, block; 5, identifier:self; 6, identifier:sectie; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, function_definition; 13, if_statement; 14, for_statement; 15, return_statement; 16, string; 17, assignment; 18, assignment; 19, assignment; 20, call; 21, function_name:creator; 22, parameters; 23, block; 24, attribute; 25, block; 26, else_clause; 27, identifier:p; 28, identifier:percelen; 29, block; 30, identifier:percelen; 31, string_content:List all percelen in a `sectie`.
  
          :param sectie: The :class:`Sectie` for which the percelen are wanted.
          :param integer sort: Field to sort on.
          :rtype: A :class:`list` of :class:`Perceel`.; 32, identifier:sid; 33, attribute; 34, identifier:aid; 35, attribute; 36, identifier:gid; 37, attribute; 38, attribute; 39, argument_list; 40, expression_statement; 41, expression_statement; 42, expression_statement; 43, expression_statement; 44, return_statement; 45, subscript; 46, identifier:is_configured; 47, expression_statement; 48, expression_statement; 49, block; 50, expression_statement; 51, identifier:sectie; 52, identifier:id; 53, attribute; 54, identifier:id; 55, attribute; 56, identifier:id; 57, identifier:sectie; 58, identifier:clear_gateway; 59, assignment; 60, assignment; 61, assignment; 62, assignment; 63, list_comprehension; 64, attribute; 65, string; 66, assignment; 67, assignment; 68, expression_statement; 69, call; 70, identifier:sectie; 71, identifier:afdeling; 72, attribute; 73, identifier:gemeente; 74, identifier:url; 75, binary_operator:self.base_url + '/municipality/%s/department/%s/section/%s/parcel' % (gid, aid, sid); 76, identifier:h; 77, attribute; 78, identifier:p; 79, dictionary; 80, identifier:res; 81, call; 82, call; 83, for_in_clause; 84, identifier:self; 85, identifier:caches; 86, string_content:short; 87, identifier:key; 88, binary_operator:'list_percelen_by_sectie_rest#%s#%s#%s' % (gid, aid, sid); 89, identifier:percelen; 90, call; 91, assignment; 92, attribute; 93, argument_list; 94, identifier:sectie; 95, identifier:afdeling; 96, attribute; 97, binary_operator:'/municipality/%s/department/%s/section/%s/parcel' % (gid, aid, sid); 98, identifier:self; 99, identifier:base_headers; 100, pair; 101, attribute; 102, argument_list; 103, identifier:Perceel; 104, argument_list; 105, identifier:r; 106, subscript; 107, string; 108, tuple; 109, attribute; 110, argument_list; 111, identifier:percelen; 112, call; 113, identifier:p; 114, identifier:set_gateway; 115, identifier:self; 116, identifier:self; 117, identifier:base_url; 118, string; 119, tuple; 120, string; 121, string; 122, call; 123, identifier:json; 124, subscript; 125, identifier:sectie; 126, subscript; 127, call; 128, identifier:res; 129, string; 130, string_content:list_percelen_by_sectie_rest#%s#%s#%s; 131, identifier:gid; 132, identifier:aid; 133, identifier:sid; 134, subscript; 135, identifier:get_or_create; 136, identifier:key; 137, identifier:creator; 138, identifier:creator; 139, argument_list; 140, string_content:/municipality/%s/department/%s/section/%s/parcel; 141, identifier:gid; 142, identifier:aid; 143, identifier:sid; 144, string_content:data; 145, string_content:adp; 146, identifier:capakey_rest_gateway_request; 147, argument_list; 148, identifier:r; 149, string; 150, identifier:r; 151, string; 152, attribute; 153, argument_list; 154, string_content:parcels; 155, attribute; 156, string; 157, identifier:url; 158, identifier:h; 159, identifier:p; 160, string_content:perceelnummer; 161, string_content:capakey; 162, identifier:self; 163, identifier:parse_percid; 164, subscript; 165, identifier:self; 166, identifier:caches; 167, string_content:short; 168, identifier:r; 169, string; 170, string_content:capakey
code: def list_percelen_by_sectie(self, sectie):
          '''
          List all percelen in a `sectie`.
  
          :param sectie: The :class:`Sectie` for which the percelen are wanted.
          :param integer sort: Field to sort on.
          :rtype: A :class:`list` of :class:`Perceel`.
          '''
          sid = sectie.id
          aid = sectie.afdeling.id
          gid = sectie.afdeling.gemeente.id
          sectie.clear_gateway()
  
          def creator():
              url = self.base_url + '/municipality/%s/department/%s/section/%s/parcel' % (gid, aid, sid)
              h = self.base_headers
              p = {
                  'data': 'adp'
              }
              res = capakey_rest_gateway_request(url, h, p).json()
              return [
                  Perceel(
                      r['perceelnummer'],
                      sectie,
                      r['capakey'],
                      self.parse_percid(r['capakey']),
                  ) for r in res['parcels']
              ]
  
          if self.caches['short'].is_configured:
              key = 'list_percelen_by_sectie_rest#%s#%s#%s' % (gid, aid, sid)
              percelen = self.caches['short'].get_or_create(key, creator)
          else:
              percelen = creator()
          for p in percelen:
              p.set_gateway(self)
          return percelen