<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(self, signal=None, plugin=None):
 """ Get one or more signals. :param signal: Name of the signal :type signal: str :param plugin: Plugin object, under which the signals where registered :type plugin: GwBasePattern """

        if plugin is not None:
            if signal is None:
                signals_list = {}
                for key in self.signals.keys():
                    if self.signals[key].plugin == plugin:
                        signals_list[key] = self.signals[key]
                return signals_list
            else:
                if signal in self.signals.keys():
                    if self.signals[signal].plugin == plugin:
                        return self.signals[signal]
                    else:
                        return None
                else:
                    return None
        else:
            if signal is None:
                return self.signals
            else:
                if signal in self.signals.keys():
                    return self.signals[signal]
                else:
                    return None