class_docstr: Default namedtuple describing `Graphs`s.
  
  A children of `collections.namedtuple`s, which allows it to be directly input
  and output from `tensorflow.Session.run()` calls.
  
  An instance of this class can be constructed as
  ```
  GraphsTuple(nodes=nodes,
              edges=edges,
              globals=globals,
              receivers=receivers,
              senders=senders,
              n_node=n_node,
              n_edge=n_edge)
  ```
  where `nodes`, `edges`, `globals`, `receivers`, `senders`, `n_node` and
  `n_edge` are arbitrary, but are typically numpy arrays, tensors, or `None`;
  see module's documentation for a more detailed description of which fields
  can be left `None`.
docstr: Applies `field_fn` to the fields `fields` of the instance.
  
  `field_fn` is applied exactly once per field in `fields`. The result must
  satisfy the `GraphsTuple` requirement w.r.t. `None` fields, i.e. the
  `SENDERS` cannot be `None` if the `EDGES` or `RECEIVERS` are not `None`,
  etc.
  
  Args:
    field_fn: A callable that take a single argument.
    fields: (iterable of `str`). An iterable of the fields to apply
      `field_fn` to.
  
  Returns:
    A copy of the instance, with the fields in `fields` replaced by the result
    of applying `field_fn` to them.
docstr_tok: ["Applies","`","field_fn","`","to","the","fields","`","fields","`","of","the","instance",".","`","field_fn","`","is","applied","exactly","once","per","field","in","`","fields","`",".","The","result","must","satisfy","the","`","GraphsTuple","`","requirement","w.r.t",".","`","None","`","fields",",","i.e",".","the","`","SENDERS","`","can","not","be","`","None","`","if","the","`","EDGES","`","or","`","RECEIVERS","`","are","not","`","None","`",",","etc",".","Args",":","field_fn",":","A","callable","that","take","a","single","argument",".","fields",":","(","iterable","of","`","str","`",")",".","An","iterable","of","the","fields","to","apply","`","field_fn","`","to",".","Returns",":","A","copy","of","the","instance",",","with","the","fields","in","`","fields","`","replaced","by","the","result","of","applying","`","field_fn","`","to","them","."]
code: def map(self, field_fn, fields=GRAPH_FEATURE_FIELDS):
      """Applies `field_fn` to the fields `fields` of the instance.
  
      `field_fn` is applied exactly once per field in `fields`. The result must
      satisfy the `GraphsTuple` requirement w.r.t. `None` fields, i.e. the
      `SENDERS` cannot be `None` if the `EDGES` or `RECEIVERS` are not `None`,
      etc.
  
      Args:
        field_fn: A callable that take a single argument.
        fields: (iterable of `str`). An iterable of the fields to apply
          `field_fn` to.
  
      Returns:
        A copy of the instance, with the fields in `fields` replaced by the result
        of applying `field_fn` to them.
      """
      return self.replace(
          **{k: field_fn(getattr(self, k)) for k in fields}
      )
  
file_path: graph_nets/graph_nets/graphs.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
label_desc: Use image node_id 4 for calling the GraphsTuple obj's underlying member method code with example usage: obj.map(field_fn, fields) and returns: self