code: def register(self, plugin):
          
  
          if not plugin or not isinstance(plugin, BasePlugin):
              raise ValueError("Plugin must be implemented as a subclass of BasePlugin class")
  
          if self.is_registered(plugin.name):
              raise ValueError("Plugin with name {} is already registered".format(plugin.name))
  
          self._plugins.append(plugin)
docs: Register a plugin. New plugins are added to the end of the plugins list.
  
          :param samtranslator.plugins.BasePlugin plugin: Instance/subclass of BasePlugin class that implements hooks
          :raises ValueError: If plugin is not an instance of samtranslator.plugins.BasePlugin or if it is already
              registered
          :return: None