code: def _extract_points_from_nodes(nodes, params, dtype=None):
      if params.x in nodes.columns and params.y in nodes.columns:
          points = np.asarray(nodes[[params.x, params.y]])
      else:
          points = np.asarray(
              np.random.random((len(nodes), params.dim)), dtype=dtype
          )
      return points
  
file_path: datashader/datashader/layout.py
imports: from __future__ import annotations
  import numpy
  import param
  import scipy.sparse
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_points_from_nodes(nodes, params, dtype) and returns: points