def run_umap(self, X=None, metric=None, **kwargs):
import umap as umap<EOL>if metric is None:<EOL><INDENT>metric = self.distance<EOL><DEDENT>if(X is not None):<EOL><INDENT>umap_obj = umap.UMAP(metric=metric, **kwargs)<EOL>dt = umap_obj.fit_transform(X)<EOL>return dt<EOL><DEDENT>else:<EOL><INDENT>umap_obj = umap.UMAP(metric=metric, **kwargs)<EOL>umap2d = umap_obj.fit_transform(self.adata.obsm['<STR_LIT>'])<EOL>self.adata.obsm['<STR_LIT>'] = umap2d<EOL><DEDENT>
Wrapper for umap-learn.

        See https://github.com/lmcinnes/umap sklearn for the documentation
        and source code.