def get_plugin(name=None, plugin_dir=None):
    """Gets the definition for the given plugin.

    Args:
        name (None): the plugin name
        plugin_dir (None): a directory containing the plugin

    Returns:
        a :class:`PluginDefinition`
    """
    if plugin_dir is not None:
        return _load_plugin_definition(plugin_dir=plugin_dir)

    plugin = _get_plugin(name)
    return _load_plugin_definition(plugin=plugin)
Gets the definition for the given plugin.

    Args:
        name (None): the plugin name
        plugin_dir (None): a directory containing the plugin

    Returns:
        a :class:`PluginDefinition`
    
fiftyone/plugins/core.py