<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_extensions(self, group=None):
 """Clear all previously registered extensions."""


        if group is None:
            ComponentRegistry._registered_extensions = {}
            return

        if group in self._registered_extensions:
            self._registered_extensions[group] = []