def _build_style_dict(self, **style_args):
        style_dict = copy.deepcopy(style_args)
        for border_type in ['thick_border', 'no_border']:
            if border_type in style_dict:
                border_setting = style_dict[border_type]

                # Type checking
                if type(border_setting) != str:
                    raise TypeError(
                        ('%s must be a string of comma ' % border_type) +
                        'separated border names (e.g. "left,right")')
                # Value checking
                if (set(border_setting.replace(' ', '').split(',')) -
                        IpyTable._valid_borders):
                    raise ValueError(
                        ('%s must be a string of comma ' % border_type) +
                        'separated border names (e.g. "left,right"). Valid ' +
                        'border names: %s' %
                        str(IpyTable._valid_borders))
                # Substitute all edges for 'all'
                if border_setting == 'all':
                    style_dict[border_type] = 'left,right,top,bottom'

        return style_dict
Called by the ReplicationLayer when we have a new pdu. We need to
dataset/ETHPy150Open epmoyer/ipy_table/ipy_table.py/IpyTable._build_style_dict--crossover with--dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/federation.py/FederationHandler.on_receive_pdu