Extract metadata from plugin archive file-like object (e.g., opened file,
    ``StringIO``).

    Parameters
    ----------
    fileobj : file-like
        MicroDrop plugin archive file object.

    Returns
    -------
    dict
        Metadata dictionary for plugin.

def extract_metadata(fileobj):
    '''
    Extract metadata from plugin archive file-like object (e.g., opened file,
    ``StringIO``).

    Parameters
    ----------
    fileobj : file-like
        MicroDrop plugin archive file object.

    Returns
    -------
    dict
        Metadata dictionary for plugin.
    '''
    tar = tarfile.open(mode="r:gz", fileobj=fileobj)

    plugin_path = path(tmp.mkdtemp(prefix='mpm-'))
    try:
        tar.extractall(plugin_path)

        return yaml.load(plugin_path.joinpath('properties.yml').bytes())
    finally:
        fileobj.seek(0)
        plugin_path.rmtree()