def METHOD_NAME(image_layer, binary):
    '''Given an ImageLayer object and a binary package manager, check for the
    OS identifier in the os-release file first. If the os-release file
    is not available, make an educated guess as to what kind of OS the layer
    might be based off of given the pkg_format + package manager. If the binary
    provided does not exist in base.yml, add a warning notice'''
    origin_layer = 'Layer {}'.format(image_layer.layer_index)
    # see if we can find what OS this is
    os_release = get_os_release(image_layer)
    if os_release:
        # We know with high degree of certainty what the OS is
        image_layer.origins.add_notice_to_origins(origin_layer, Notice(
            formats.os_release.format(os_style=os_release), 'info'))
        # we can set the OS of the image layer
        image_layer.os_guess = os_release
    else:
        # We will try looking for the possible OSs based on the binary
        os_guess = command_lib.check_os_guess(binary)
        if os_guess:
            # We can make a guess
            image_layer.origins.add_notice_to_origins(origin_layer, Notice(
                formats.os_style_guess.format(
                    package_manager=binary, os_list=os_guess), 'info'))
            image_layer.os_guess = os_guess
        else:
            # No binary and no os-release means we have no idea about base OS
            image_layer.origins.add_notice_to_origins(origin_layer, Notice(
                errors.no_etc_release, 'warning'))
    # set a package format if there is one for this binary
    image_layer.pkg_format = command_lib.check_pkg_format(binary)