def METHOD_NAME(pkg_obj, pkg_listing, shell, work_dir, envs):
    '''Given a Package object and the Package listing from the command
    library, fill in the attribute value returned from looking up the
    data and methods of the package listing.If there are errors, fill out
    notices'''
    # create a NoticeOrigin for the package
    origin_str = 'command_lib/snippets.yml'
    pkg_dict = {}
    for key in command_lib.package_keys:
        key_listing, listing_msg = command_lib.check_library_key(
            pkg_listing, key)
        if key_listing:
            key_list, invoke_msg = command_lib.get_pkg_attr_list(
                shell, key_listing, work_dir, envs, package_name=pkg_obj.name)
            if key_list:
                pkg_dict.update({key: key_list})
            else:
                pkg_obj.origins.add_notice_to_origins(
                    origin_str, Notice(invoke_msg, 'error'))
        else:
            pkg_obj.origins.add_notice_to_origins(
                origin_str, Notice(listing_msg, 'warning'))
    pkg_obj.fill(pkg_dict)