def METHOD_NAME(self, batch_path):
    """
    Get actions for current node.
    """
    if self._done:
        return None, None
    db_action_spaces, db_references = [], []
    e = batch_path[1][:,-1]
    last_r = batch_path[0][:,-1]
    seen_nodes = batch_path[1]
    entity2bucketid = self.kg.entity2bucketid[e.tolist()]
    key1 = entity2bucketid[:, 0]
    key2 = entity2bucketid[:, 1]
    batch_ref = {}
    for i in range(len(e)):
        key = int(key1[i])
        if not key in batch_ref:
            batch_ref[key] = []
        batch_ref[key].append(i)
    for key in batch_ref:
        action_space = self.kg.action_space_buckets[key]
        l_batch_refs = batch_ref[key]
        g_bucket_ids = key2[l_batch_refs].tolist()
        if self.args.use_gpu:
            r_space_b = action_space[0][0][g_bucket_ids]
        else:
            r_space_b = action_space[0][0][g_bucket_ids].cpu()
        if self.args.use_gpu:
            e_space_b = action_space[0][1][g_bucket_ids]
        else:
            e_space_b = action_space[0][1][g_bucket_ids].cpu()
        if self.args.use_gpu:
            action_mask_b = action_space[1][g_bucket_ids]
        else:
            action_mask_b = action_space[1][g_bucket_ids].cpu()
        if self.args.use_gpu:
            last_r_b = last_r[l_batch_refs].cuda()
        else:
            last_r_b = last_r[l_batch_refs]
        if self.args.use_gpu:
            seen_nodes_b = seen_nodes[l_batch_refs].cuda()
        else:
            seen_nodes_b = seen_nodes[l_batch_refs]
        action_space_b = ((r_space_b, e_space_b), action_mask_b)
        action_space_b = self.apply_action_masks(action_space_b, last_r_b, seen_nodes_b, self.kg)
        db_action_spaces.append(action_space_b)
        db_references.extend(l_batch_refs)
    inv_offset = [i for i, _ in sorted(enumerate(db_references), key=lambda x: x[1])]
    action_space = self.pad_and_cat_action_space(db_action_spaces, inv_offset)
    return action_space