def METHOD_NAME(self):
    """ walk_from_graph
    """
    def node_generator():
        """ node_generator
        """
        if self.train_files is None:
            while True:
                for nodes in self.graph.node_batch_iter(self.batch_size):
                    yield nodes
        else:
            nodes = []
            while True:
                for filename in self.train_files:
                    with io.open(filename) as inf:
                        for line in inf:
                            node = int(line.strip('\n\t'))
                            nodes.append(node)
                            if len(nodes) == self.batch_size:
                                yield nodes
                                nodes = []
            if len(nodes):
                yield nodes
    if "alias" in self.graph.node_feat and "events" in self.graph.node_feat:
        log.info("Deepwalk using alias sample")
    for nodes in node_generator():
        if "alias" in self.graph.node_feat and "events" in self.graph.node_feat:
            walks = deepwalk_sample(self.graph, nodes, self.walk_len,
                                    "alias", "events")
        else:
            walks = deepwalk_sample(self.graph, nodes, self.walk_len)
        yield walks