def import_plugin(package_name, include_available=False):
available_plugins_dir = MICRODROP_CONDA_SHARE.joinpath('<STR_LIT>',<EOL>'<STR_LIT>')<EOL>enabled_plugins_dir = MICRODROP_CONDA_ETC.joinpath('<STR_LIT>', '<STR_LIT>')<EOL>search_paths = [enabled_plugins_dir]<EOL>if include_available:<EOL><INDENT>search_paths += [available_plugins_dir]<EOL><DEDENT>for dir_i in search_paths:<EOL><INDENT>if dir_i not in sys.path:<EOL><INDENT>sys.path.insert(<NUM_LIT:0>, dir_i)<EOL><DEDENT><DEDENT>module_name = package_name.split('<STR_LIT:.>')[-<NUM_LIT:1>].replace('<STR_LIT:->', '<STR_LIT:_>')<EOL>return importlib.import_module(module_name)<EOL>
Import MicroDrop plugin.

Parameters
----------
package_name : str
    Name of MicroDrop plugin Conda package.
include_available : bool, optional
    If ``True``, import from all available plugins (not just **enabled**
    ones).

    By default, only the ``<conda>/etc/microdrop/plugins/enabled``
    directory is added to the Python import paths (if necessary).

    If ``True``, also add the ``<conda>/share/microdrop/plugins/available``
    directory to the Python import paths.

Returns
-------
module
    Imported plugin module.