code: def parse_scatter_inputs(
      points,
      samples=None,
      ids=None,
      link_field=None,
      labels=None,
      sizes=None,
      edges=None,
      classes=None,
  ):
      points = np.asarray(points)
      num_dims = points.shape[1]
  
      if ids is None and samples is not None:
          if num_dims != 2:
              msg = "Interactive selection is only supported in 2D"
              warnings.warn(msg)
          else:
              ids = _get_ids(samples, link_field=link_field, ref=points)
  
      labels = _parse_values(
          labels,
          "labels",
          samples=samples,
          ids=ids,
          link_field=link_field,
          ref=points,
      )
  
      sizes = _parse_values(
          sizes,
          "sizes",
          samples=samples,
          ids=ids,
          link_field=link_field,
          ref=points,
      )
  
      if ids is not None:
          ids = np.asarray(ids)
  
      if sizes is not None:
          sizes = np.asarray(sizes)
  
      if edges is not None:
          edges = np.asarray(edges)
  
      if labels is None:
          return points, ids, None, sizes, edges, None, False
  
      labels = np.asarray(labels)
  
      if not etau.is_str(labels[0]):
          return points, ids, labels, sizes, edges, None, False
  
      if classes is None:
          classes = sorted(set(labels))
          return points, ids, labels, sizes, edges, classes, True
  
      found = np.array([l in classes for l in labels])
      if not np.all(found):
          points = points[found, :]
          labels = labels[found]
  
          if sizes is not None:
              sizes = sizes[found]
  
          if ids is not None:
              ids = ids[found]
  
          if edges is not None:
              i = set(np.nonzero(found)[0])
              edges = np.array(
                  [e for e in edges if e[0] in i and e[1] in i]
              )
  
      return points, ids, labels, sizes, edges, classes, True
  
imports: import itertools
  import warnings
  import numpy
  import sklearn.linear_model
  import sklearn.metrics
  import eta.core.serial
  import eta.core.utils
  import fiftyone.core.expressions
  import fiftyone.core.labels
label_desc: Use image node_id 1 for calling a global function with example usage: parse_scatter_inputs(points, samples, ids, link_field, labels, sizes, edges, classes) and returns: points,  ids,  labels,  sizes,  edges,  classes,  True, points,  ids,  None,  sizes,  edges,  None,  False, points,  ids,  labels,  sizes,  edges,  None,  False, points,  ids,  labels,  sizes,  edges,  classes,  True