def ensure_mongo_home_not_used(mongo_installation):
    output = execute_command([
        "ps",
        "-eaf"
    ])

    if mongo_installation in output:
        msg = ("ERROR: Cannot uninstall '%s' because its currently being used. "
               "Please terminate all running processes then try again." %
               mongo_installation)
        raise MongoctlException(msg)

###############################################################################
dataset/ETHPy150Open mongolab/mongoctl/mongoctl/commands/misc/install.py/ensure_mongo_home_not_used/original