<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vendorize(vendor_requirements):
 """ This is the main entry point for vendorizing requirements. It expects a list of tuples that should contain the name of the library and the version. For example, a library ``foo`` with version ``0.0.1`` would look like:: vendor_requirements = [ ('foo', '0.0.1'), ] """


    for library in vendor_requirements:
        if len(library) == 2:
            name, version = library
            cmd = None
        elif len(library) == 3:  # a possible cmd we need to run
            name, version, cmd = library
        vendor_library(name, version, cmd)