# Buggy code
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        "list",
        description=descr,
        help=descr,
        formatter_class=RawDescriptionHelpFormatter,
        epilog=examples,
        add_help=False,
    )
    add_parser_help(p)
    add_parser_prefix(p)
    add_parser_json(p)
    add_parser_show_channel_urls(p)
    p.add_argument(
        "-c",
        "--canonical",
        action="store_true",
        help="Output canonical names of packages only. Implies --no-pip. ",
    )
    p.add_argument(
        "-f",
        "--full-name",
        action="store_true",
        help="Only search for full names, i.e., ^<regex>$.",
    )
    p.add_argument(
        "--explicit",
        action="store_true",
        help="List explicitly all installed conda packaged with URL "
        "(output may be used by conda create --file).",
    )
    p.add_argument(
        "--md5",
        action="store_true",
        help="Add MD5 hashsum when using --explicit",
    )
    p.add_argument(
        "-e",
        "--export",
        action="store_true",
        help="Output requirement string only (output may be used by "
        " conda create --file).",
    )
    p.add_argument(
        "-r",
        "--revisions",
        action="store_true",
        help="List the revision history and exit.",
    )
    p.add_argument(
        "--no-pip",
        action="store_false",
        default=True,
        dest="pip",
        help="Do not include pip-only installed packages.",
    )
    p.add_argument(
        "regex",
        action="store",
        nargs="?",
        help="List only packages matching this regular expression.",
    )
    p.set_defaults(func=execute)


# Traceback (ImportError)
Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(module)
File "/Users/tasalta/anaconda/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main_list.py", line 20, in <module>
from ..egg_info import get_egg_info
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/egg_info.py", line 15, in <module>
from .misc import rel_path
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/misc.py", line 19, in <module>
from .core.index import get_index, _supplement_index_with_cache
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/core/index.py", line 9, in <module>
from .repodata import collect_all_repodata
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/core/repodata.py", line 21, in <module>
from requests.packages.urllib3.exceptions import InsecureRequestWarning
ImportError: cannot import name InsecureRequestWarning


at throwCondaError (/Applications/GraphLab Create Launcher.app/Contents/Resources/app.asar/utils/conda.js:117:9)
at runConda (/Applications/GraphLab Create Launcher.app/Contents/Resources/app.asar/utils/conda.js:146:5)
at Object.info (/Applications/GraphLab Create Launcher.app/Contents/Resources/app.asar/utils/conda.js:395:10)
at Object.isGLCLauncherReady (/Applications/GraphLab Create Launcher.app/Contents/Resources/app.asar/utils/systemState.js:207:27)
at [object Object].onWindowOpen [as _onTimeout] (/Applications/GraphLab Create Launcher.app/Contents/Resources/app.asar/main.js:144:57)
at Timer.listOnTimeout (timers.js:89:15)

# Fixed code
def configure_parser(sub_parsers):
    from .common import (
        add_parser_help,
        add_parser_json,
        add_parser_prefix,
        add_parser_show_channel_urls,
    )

    p = sub_parsers.add_parser(
        "list",
        description=descr,
        help=descr,
        formatter_class=RawDescriptionHelpFormatter,
        epilog=examples,
        add_help=False,
    )
    add_parser_help(p)
    add_parser_prefix(p)
    add_parser_json(p)
    add_parser_show_channel_urls(p)
    p.add_argument(
        "-c",
        "--canonical",
        action="store_true",
        help="Output canonical names of packages only. Implies --no-pip. ",
    )
    p.add_argument(
        "-f",
        "--full-name",
        action="store_true",
        help="Only search for full names, i.e., ^<regex>$.",
    )
    p.add_argument(
        "--explicit",
        action="store_true",
        help="List explicitly all installed conda packaged with URL "
        "(output may be used by conda create --file).",
    )
    p.add_argument(
        "--md5",
        action="store_true",
        help="Add MD5 hashsum when using --explicit",
    )
    p.add_argument(
        "-e",
        "--export",
        action="store_true",
        help="Output requirement string only (output may be used by "
        " conda create --file).",
    )
    p.add_argument(
        "-r",
        "--revisions",
        action="store_true",
        help="List the revision history and exit.",
    )
    p.add_argument(
        "--no-pip",
        action="store_false",
        default=True,
        dest="pip",
        help="Do not include pip-only installed packages.",
    )
    p.add_argument(
        "regex",
        action="store",
        nargs="?",
        help="List only packages matching this regular expression.",
    )
    p.set_defaults(func=execute)