code: def call_plugin(plugin, f, *args, **kwargs):
      
      try:
          getattr(plugin, f)
      except AttributeError:
          return None
      if kwargs:
          getattr(plugin, f)(
              *args,
              **kwargs
          )
      else:
          return getattr(plugin, f)(
              *args
          )
docs: Calls function f from plugin, returns None if plugin does not implement f.