class_docstr: Element is the atomic datastructure used to wrap some data with
  an associated visual representation, e.g. an element may
  represent a set of points, an image or a curve. Elements provide
  a common API for interacting with data of different types and
  define how the data map to a set of dimensions and how those
  map to the visual representation.
class_docstr_tok: ["Element","is","the","atomic","datastructure","used","to","wrap","some","data","with","an","associated","visual","representation",",","e.g",".","an","element","may","represent","a","set","of","points",",","an","image","or","a","curve",".","Elements","provide","a","common","API","for","interacting","with","data","of","different","types","and","define","how","the","data","map","to","a","set","of","dimensions","and","how","those","map","to","the","visual","representation","."]
docstr: Snap list or dict of coordinates to closest position.
  
  Args:
      coords: List of 1D or 2D coordinates
      **kwargs: Coordinates specified as keyword pairs
  
  Returns:
      List of tuples of the snapped coordinates
  
  Raises:
      NotImplementedError: Raised if snapping is not supported
code: def closest(self, coords, **kwargs):
      """Snap list or dict of coordinates to closest position.
  
      Args:
          coords: List of 1D or 2D coordinates
          **kwargs: Coordinates specified as keyword pairs
  
      Returns:
          List of tuples of the snapped coordinates
  
      Raises:
          NotImplementedError: Raised if snapping is not supported
      """
      raise NotImplementedError
  
imports: from itertools import groupby
  import numpy
  import pandas
  import param
  from .dimension import Dimensioned, ViewableElement, asdim
  from .layout import Composable, Layout, NdLayout
  from .ndmapping import NdMapping
  from .overlay import CompositeOverlay, NdOverlay, Overlayable
  from .spaces import GridSpace, HoloMap
  from .tree import AttrTree
  from .util import get_param_values
label_desc: Use image node_id 7 for calling the Element obj's underlying member method code with example usage: obj.closest(coords) without return types