FormNetwork.neighborhood

FormNetwork.neighborhood(key, ring=1)

Return the nodes in the neighborhood of a node.

Parameters
  • key (hashable) – The identifier of the node.

  • ring (int, optional) – The size of the neighborhood.

Returns

list[hashable] – A list of node identifiers.