def pip_to_use(py_version):
    """
    Determines which pip command to use for CodeBuild based on the Python
    version being used on AWS Lambda.

    Parameters
    ----------
    py_version : str
        Python version being used. Must be one of "2.7", "3.6", or "3.7"

    Returns
    -------
    str
        Pip command that should be used.
    """
    if py_version == '2.7':
        return 'pip-2.7'
    if py_version == ('3.6' or 'None'):
        return 'pip-3.6'
    if py_version == '3.7':
        return 'pip3.7'
    return 'pip-3.6'
