<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_conda():
 """ Try to find conda on the system """

    USER_HOME = os.path.expanduser('~')
    CONDA_HOME = os.environ.get('CONDA_HOME', '')
    PROGRAMDATA = os.environ.get('PROGRAMDATA', '')

    # Search common install paths and sys path
    search_paths = [
        # Windows
        join(PROGRAMDATA, 'miniconda2', 'scripts'),
        join(PROGRAMDATA, 'miniconda3', 'scripts'),
        join(USER_HOME, 'miniconda2', 'scripts'),
        join(USER_HOME, 'miniconda3', 'scripts'),
        join(CONDA_HOME, 'scripts'),

        # Linux
        join(USER_HOME, 'miniconda2', 'bin'),
        join(USER_HOME, 'miniconda3', 'bin'),
        join(CONDA_HOME, 'bin'),
        # TODO: OSX
    ] + os.environ.get("PATH", "").split(";" if 'win' in sys.path else ":")

    cmd = 'conda.exe' if IS_WIN else 'conda'
    for conda_path in search_paths:
        conda = join(conda_path, cmd)
        if exists(conda):
            return sh.Command(conda)

    # Try to let the system find it
    return sh.conda