def argospm_package_name(pkg):
    """Gets argospm name of an IPackage.

    Args:
        pkg (IPackage): The package to get the name of.

    Returns:
        str: Package name for argospm
    """
    to_return = pkg.type
    if pkg.from_code and pkg.to_code:
        to_return += "-" + pkg.from_code + "_" + pkg.to_code
    return to_return