docs: def coerce_to_indices(self, nodes):
          """Return the nodes indices for nodes, where ``nodes`` is either
          already integer indices or node labels.
          """
          if nodes is None:
              return self.node_indices
  
          if all(isinstance(node, str) for node in nodes):
              indices = self.labels2indices(nodes)
          else:
              indices = map(int, nodes)
          return tuple(sorted(set(indices)))