def get_columns(self, node, ctx):
        """
        returns the sub-set of columns in the dataframe returned
        by get_dataframe that relate to a particular node
        """
        ctx_id = ctx if isinstance(ctx, int) else ctx.get_id()

        try:
            return self._cached_columns[(ctx_id, node)]
        except __HOLE__:
            pass

        handler_dict = self.context_handler_dict[ctx_id]

        # the ctx is the root context passed to __call__, which may be
        # different from the shifted contexts that the node was actually
        # evaluated in.
        # Get all the columns for this node in all sub-contexts.
        columns = []
        ctx_ids = []
        for (node_name, short_name, sub_ctx_id), handler in handler_dict.items():
            if node_name == node.name \
            and short_name == node.short_name:
                columns.append(handler.get_columns())
                ctx_ids.append(sub_ctx_id)

        # re-label in case the same node was evaluated in multiple sub-contexts
        columns = _relabel(columns,
                            [node.name] * len(columns),
                            [node.short_name] * len(columns),
                            ctx_ids)

        return reduce(operator.add, columns, [])
dataset/ETHPy150Open manahl/mdf/mdf/builders/basic.py/DataFrameBuilder.get_columns