def licenses_mapper(license, licenses):
    """
    Return declared_licenses list based on the `license` and
    `licenses` values found in a package.
    """
    declared_licenses = []
    if license:
        declared_licenses.append(str(license).strip())
    if licenses:
        for lic in licenses:
            if lic and lic.strip():
                declared_licenses.append(lic.strip())
    return declared_licenses
