def extract_metadata(fileobj):
tar = tarfile.open(mode="<STR_LIT>", fileobj=fileobj)<EOL>plugin_path = path(tmp.mkdtemp(prefix='<STR_LIT>'))<EOL>try:<EOL><INDENT>tar.extractall(plugin_path)<EOL>return yaml.load(plugin_path.joinpath('<STR_LIT>').bytes())<EOL><DEDENT>finally:<EOL><INDENT>fileobj.seek(<NUM_LIT:0>)<EOL>plugin_path.rmtree()<EOL><DEDENT>
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.