set/update global style configurations for magblock elements
        update Magblock._styleconfig_dict and _styleconfig_json

        :param config: configuration dict or json
        :param showhelp: if True, print showhelp information, default is False
        :return: new style config dict

        :Example:

        >>> MagBlock.setStyleConfig(
            config={'quad':{'fc':'blue', 'ec': 'blue'},
                    'bend':{'fc':'red', 'ec': 'red'}})
        >>> MagBlock.setStyleConfig(showhelp=True)
        The input configuration string should be with the format like:
        {"quad": {"h": 0.6, "fc": "red", "ec": "red", "alpha": 0.5},
         "drift": {"color": "black", "h": 0.1, "alpha": 0.75, "lw": 1},
         "bend": {"h": 0.5, "fc": "blue", "ec": "blue", "alpha": 0.5},
         "moni": {"color": "#FF9500", "lw": 1, "alpha": 0.75}}
        with all or part of new properties, e.g. {"quad": {"fc": "blue"}}

def setStyleConfig(config=None, showhelp=False):
        """ set/update global style configurations for magblock elements
        update Magblock._styleconfig_dict and _styleconfig_json

        :param config: configuration dict or json
        :param showhelp: if True, print showhelp information, default is False
        :return: new style config dict

        :Example:

        >>> MagBlock.setStyleConfig(
            config={'quad':{'fc':'blue', 'ec': 'blue'},
                    'bend':{'fc':'red', 'ec': 'red'}})
        >>> MagBlock.setStyleConfig(showhelp=True)
        The input configuration string should be with the format like:
        {"quad": {"h": 0.6, "fc": "red", "ec": "red", "alpha": 0.5},
         "drift": {"color": "black", "h": 0.1, "alpha": 0.75, "lw": 1},
         "bend": {"h": 0.5, "fc": "blue", "ec": "blue", "alpha": 0.5},
         "moni": {"color": "#FF9500", "lw": 1, "alpha": 0.75}}
        with all or part of new properties, e.g. {"quad": {"fc": "blue"}}

        """
        if showhelp:
            print("The input configuration string should be with the format like:")
            print(MagBlock._MagBlock__styleconfig_json)
            print("with all or part of new properties, e.g.")
            print(json.dumps({'quad': {'fc': 'blue'}}))
        else:
            if config is None:
                config = MagBlock._MagBlock__styleconfig_dict
            if isinstance(config, dict):
                for k in set(config.keys()) & set(MagBlock._MagBlock__styleconfig_dict.keys()):
                    for k1 in set(config[k].keys()) & set(MagBlock._MagBlock__styleconfig_dict[k].keys()):
                        MagBlock._MagBlock__styleconfig_dict[k][k1] = config[k][k1]
                MagBlock._MagBlock__styleconfig_json = json.dumps(MagBlock._MagBlock__styleconfig_dict)
            elif isinstance(config, str):
                config = json.loads(config)
                for k in set(config.keys()) & set(MagBlock._MagBlock__styleconfig_dict.keys()):
                    for k1 in set(config[k].keys()) & set(MagBlock._MagBlock__styleconfig_dict[k].keys()):
                        MagBlock._MagBlock__styleconfig_dict[k][k1] = config[k][k1]
                MagBlock._MagBlock__styleconfig_json = json.dumps(MagBlock._MagBlock__styleconfig_dict)
            else:
                print("Information string ERROR.")

            return MagBlock._MagBlock__styleconfig_dict