class_docstr: Base class for exploring graphs.
class_docstr_tok: ["Base","class","for","exploring","graphs","."]
docstr: Sample ``size`` neighbours of ``cur_node`` without checking node types or edge types, optionally
  using edge weights.
docstr_tok: ["Sample","``","size","``","neighbours","of","``","cur_node","``","without","checking","node","types","or","edge","types",",","optionally","using","edge","weights","."]
code: def _sample_neighbours_untyped(
      self, neigh_func, py_and_np_rs, cur_node, size, weighted
  ):
      """
      Sample ``size`` neighbours of ``cur_node`` without checking node types or edge types, optionally
      using edge weights.
      """
      if cur_node != -1:
          neighbours = neigh_func(
              cur_node, use_ilocs=True, include_edge_weight=weighted
          )
  
          if weighted:
              neighbours, weights = neighbours
      else:
          neighbours = []
  
      if len(neighbours) > 0:
          if weighted:
              # sample following the edge weights
              idx = naive_weighted_choices(
                  py_and_np_rs[1], weights, size=size
              )
              if idx is not None:
                  return neighbours[idx]
          else:
              # uniform sample; for small-to-moderate `size`s (< 100 is typical for GraphSAGE), random
              # has less overhead than np.random
              return np.array(
                  py_and_np_rs[0].choices(neighbours, k=size)
              )
  
      # no neighbours (e.g. isolated node, cur_node == -1 or all weights 0), so propagate the -1 sentinel
      return np.full(size, -1)
  
imports: import numpy
  import warnings
  from collections import defaultdict, deque
  from scipy import stats
  from scipy.special import softmax
  from ..core.schema import GraphSchema
  from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable
  from ..core.validation import require_integer_in_range, comma_sep
  from ..random import random_state
  from abc import ABC, abstractmethod
label_desc: Use image node_id 13 for calling the GraphWalk obj's underlying member method code with example usage: obj._sample_neighbours_untyped(neigh_func, py_and_np_rs, cur_node, size, weighted) and returns: np, np, neighbours