docs: def build(self, X, Y, w=None, edges=None):
          """ Assigns data to this object and builds the requested topological
              structure
              @ In, X, an m-by-n array of values specifying m
              n-dimensional samples
              @ In, Y, a m vector of values specifying the output
              responses corresponding to the m samples specified by X
              @ In, w, an optional m vector of values specifying the
              weights associated to each of the m samples used. Default of
              None means all points will be equally weighted
              @ In, edges, an optional list of custom edges to use as a
              starting point for pruning, or in place of a computed graph.
          """
          self.reset()
  
          if X is None or Y is None:
              return
  
          self.__set_data(X, Y, w)
  
          if self.debug:
              sys.stdout.write("Graph Preparation: ")
              start = time.clock()
  
          self.graph_rep = nglpy.Graph(
              self.Xnorm,
              self.graph,
              self.max_neighbors,
              self.beta,
              connect=self.connect,
          )
  
          if self.debug:
              end = time.clock()
              sys.stdout.write("%f s\n" % (end - start))