code: def set_tweights_all(self, tweights):
          r
          for node, (twsource, twsink) in enumerate(tweights):
              self.set_tweight(node, twsource, twsink)
docs: r"""
          Set all t-weights at once.
          
          Parameters
          ----------
          tweights : iterable
              Containing a pair of numeric values for each of the graphs nodes.
          
          Notes
          -----
          Since this method overrides already existing t-weights, it is strongly
          recommended to run `set_source_nodes` and `set_sink_nodes` after the
          last call to this method.
          
          The weights for nodes directly connected to either the source or the sink
          are best set using `set_source_nodes` or `set_sink_nodes` to ensure
          consistency of their maximum values.