class_docstr: Implements DPQuery interface for structured queries.
  
  NestedQuery evaluates arbitrary nested structures of queries. Records must be
  nested structures of tensors that are compatible (in type and arity) with the
  query structure, but are allowed to have deeper structure within each leaf of
  the query structure. The entire substructure of each record corresponding to a
  leaf node of the query structure is routed to the corresponding query.
  
  For example, a nested query with structure "[q1, q2]" is compatible with a
  record of structure "[t1, (t2, t3)]": t1 would be processed by q1, and (t2,
  t3) would be processed by q2. On the other hand, "[q1, q2]" is not compatible
  with "(t1, t2)" (type mismatch), "[t1]" (arity-mismatch) or "[t1, t2, t3]"
  (arity-mismatch).
  
  It is possible for the same tensor to be consumed by multiple sub-queries, by
  simply replicating it in the record, for example providing "[t1, t1]" to
  "[q1, q2]".
  
  NestedQuery is intended to allow privacy mechanisms for groups as described in
  [McMahan & Andrew, 2018: "A General Approach to Adding Differential Privacy to
  Iterative Training Procedures" (https://arxiv.org/abs/1812.06210)].
class_docstr_tok: ["Implements","DPQuery","interface","for","structured","queries",".","NestedQuery","evaluates","arbitrary","nested","structures","of","queries",".","Records","must","be","nested","structures","of","tensors","that","are","compatible","(","in","type","and","arity",")","with","the","query","structure",",","but","are","allowed","to","have","deeper","structure","within","each","leaf","of","the","query","structure",".","The","entire","substructure","of","each","record","corresponding","to","a","leaf","node","of","the","query","structure","is","routed","to","the","corresponding","query",".","For","example",",","a","nested","query","with","structure","``","[","q1",",","q2","]","''","is","compatible","with","a","record","of","structure","``","[","t1",",","(","t2",",","t3",")","]","''",":","t1","would","be","processed","by","q1",",","and","(","t2",",","t3",")","would","be","processed","by","q2",".","On","the","other","hand",",","``","[","q1",",","q2","]","''","is","not","compatible","with","``","(","t1",",","t2",")","''","(","type","mismatch",")",",","``","[","t1","]","''","(","arity-mismatch",")","or","``","[","t1",",","t2",",","t3","]","''","(","arity-mismatch",")",".","It","is","possible","for","the","same","tensor","to","be","consumed","by","multiple","sub-queries",",","by","simply","replicating","it","in","the","record",",","for","example","providing","``","[","t1",",","t1","]","''","to","''","[","q1",",","q2","]","''",".","NestedQuery","is","intended","to","allow","privacy","mechanisms","for","groups","as","described","in","[","McMahan","&","Andrew",",","2018",":","``","A","General","Approach","to","Adding","Differential","Privacy","to","Iterative","Training","Procedures","''","(","https",":","\/\/arxiv.org\/abs\/1812.06210",")","]","."]
docstr: Implements `tensorflow_privacy.DPQuery.initial_sample_state`.
docstr_tok: ["Implements","`","tensorflow_privacy.DPQuery.initial_sample_state","`","."]
code: def initial_sample_state(self, template=None):
      """Implements `tensorflow_privacy.DPQuery.initial_sample_state`."""
      if template is None:
          return self._map_to_queries("initial_sample_state")
      else:
          return self._map_to_queries("initial_sample_state", template)
  
imports: import collections
  import dp_accounting
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import dp_query
  import tree
label_desc: Use image node_id 5 for calling the NestedQuery obj's underlying member method code with example usage: obj.initial_sample_state(template) and returns: self, self