@plac.annotations(<EOL>model=("<STR_LIT>", "<STR_LIT>", None, str),<EOL>direct=("<STR_LIT>", "<STR_LIT>", "<STR_LIT:d>", bool),<EOL>pip_args=("<STR_LIT>"),<EOL>)<EOL>def download(model, direct=False, *pip_args):
dl_tpl = "<STR_LIT>"<EOL>if direct:<EOL><INDENT>components = model.split("<STR_LIT:->")<EOL>model_name = "<STR_LIT>".join(components[:-<NUM_LIT:1>])<EOL>version = components[-<NUM_LIT:1>]<EOL>dl = download_model(dl_tpl.format(m=model_name, v=version), pip_args)<EOL><DEDENT>else:<EOL><INDENT>shortcuts = get_json(about.__shortcuts__, "<STR_LIT>")<EOL>model_name = shortcuts.get(model, model)<EOL>compatibility = get_compatibility()<EOL>version = get_version(model_name, compatibility)<EOL>dl = download_model(dl_tpl.format(m=model_name, v=version), pip_args)<EOL>if dl != <NUM_LIT:0>:  <EOL><INDENT>sys.exit(dl)<EOL><DEDENT>msg.good(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>".format(model_name),<EOL>)<EOL>if model in shortcuts:<EOL><INDENT>try:<EOL><INDENT>package_path = get_package_path(model_name)<EOL>link(model_name, model, force=True, model_path=package_path)<EOL><DEDENT>except:  <EOL><INDENT>msg.warn(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(model, model_name),<EOL>)<EOL><DEDENT><DEDENT><DEDENT>
Download compatible model from default download path using pip. Model
can be shortcut, model name or, if --direct flag is set, full model name
with version. For direct downloads, the compatibility check will be skipped.