def cookbook_collection(node)
      if chef_run.respond_to?(:run_context)
        chef_run.run_context.cookbook_collection # Chef 11.8+
      elsif node.respond_to?(:run_context)
        node.run_context.cookbook_collection # Chef 11+
      else
        node.cookbook_collection # Chef 10
      end
    end
def cookbook_collection(node)
      if chef_run.respond_to?(:run_context)
        chef_run.run_context.cookbook_collection # Chef 11.8+
      elsif node.respond_to?(:run_context)
        node.run_context.cookbook_collection # Chef 11+
      else
        node.cookbook_collection # Chef 10
      end
    end
The cookbook collection for the current Chef run context. Handles
 the differing cases between Chef 10 and Chef 11.

 @param [Chef::Node] node
   the Chef node to get the cookbook collection from

 @return [Array<Chef::Cookbook>]