<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_plugin_settings(plugin, directory=None):
 """Gets the settings for the specified plugin."""

    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    return plugins.get(plugin) if isinstance(plugins, dict) else None