class_docstr: An approach for optimizing submodular functions.
  
  This object contains a single method, `select`, that implements an
  algorithm for optimizing submodular functions. This method will take in the
  data set, the number of examples to select, and a stored reference to the
  submodular function to be optimized, and yield a subset of examples. The
  method operates on the gains provided in the `_calculate_gains` method from
  the submodular function object and stores examples using the `_select_next`
  method.
  
  Parameters
  ----------
  function : base.BaseSelection
          A submodular function that implements the `_calculate_gains` and
          `_select_next` methods. This is the function that will be
          optimized.
  
  verbose : bool
          Whether to display a progress bar during the optimization process.
  
  
  Attributes
  ----------
  self.function : base.BaseSelection or None
          A submodular function that implements the `_calculate_gains` and
          `_select_next` methods. This is the function that will be
          optimized. If None, will be set by the selector when passed in.
  
  self.verbose : bool
          Whether to display a progress bar during the optimization process.
class_docstr_tok: ["An","approach","for","optimizing","submodular","functions",".","This","object","contains","a","single","method",",","`","select","`",",","that","implements","an","algorithm","for","optimizing","submodular","functions",".","This","method","will","take","in","the","data","set",",","the","number","of","examples","to","select",",","and","a","stored","reference","to","the","submodular","function","to","be","optimized",",","and","yield","a","subset","of","examples",".","The","method","operates","on","the","gains","provided","in","the","`","_calculate_gains","`","method","from","the","submodular","function","object","and","stores","examples","using","the","`","_select_next","`","method",".","Parameters","--","--","--","--","--","function",":","base.BaseSelection","A","submodular","function","that","implements","the","`","_calculate_gains","`","and","`","_select_next","`","methods",".","This","is","the","function","that","will","be","optimized",".","verbose",":","bool","Whether","to","display","a","progress","bar","during","the","optimization","process",".","Attributes","--","--","--","--","--","self.function",":","base.BaseSelection","or","None","A","submodular","function","that","implements","the","`","_calculate_gains","`","and","`","_select_next","`","methods",".","This","is","the","function","that","will","be","optimized",".","If","None",",","will","be","set","by","the","selector","when","passed","in",".","self.verbose",":","bool","Whether","to","display","a","progress","bar","during","the","optimization","process","."]
code: def select(self, X, k):
      raise NotImplementedError
  
imports: import os
  import copy
  import numpy
  import scipy
  from tqdm import tqdm
  from .utils import PriorityQueue
  from .utils import check_random_state
  from .utils import _calculate_pairwise_distances
label_desc: Use image node_id 2 for calling the BaseOptimizer obj's underlying member method code with example usage: obj.select(X, k) without return types