You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: operatingsystems_helper.rb
    path of file: ./repos/foreman/app/helpers
    
    the code of the file until where you have to start completion: module OperatingsystemsHelper
  include CommonParametersHelper

  def label(record)
    return "" if record.blank? || record.name.blank?
    record.to_label
  end

  # Return OS icon image tag. Stub is used in some cases because
  # of legal requirements. Make sure to get legal advice prior
  # putting any logos into our git repository.
  def icon(record, opts = {})
    return "" if record.blank? || record.name.blank?
    size = opts[:size] ||= '16x16'
    name = case record.name.downcase
           when /fedora|fcos|coreos/i
             "fedora"
           when /redhat|rhcos/i
             "redhat"
           when /ubuntu/
             "ubuntu"
   
    
  def icon(record, opts = {})
    return "" if record.blank? || record.name.blank?
    size = opts[:size] ||= '16x16'
    name = case record.name.downcase
           when /fedora|fcos|coreos/i
             "fedora"
           when /redhat|rhcos/i
             "redhat"
           when /ubuntu/
             "ubuntu"
           when /solaris|sunos/
             "stub/steelblue-s"
           when /darwin/
             "stub/darkred-d"
           when /centos/
             "centos"
           when /rocky/
             "rocky"
           when /scientific/
             "scientific"
           when /archlinux/
             "archlinux"
           when /^alt/
             "alt"
           when /gentoo/
             "gentoo"
           when /slc/
             "stub/blue-s"
           when /freebsd/
             "freebsd"
           when /aix/
             "stub/forestgreen-a"
           when /junos/
             "stub/darkblue-j"
           when /vrp/
             "stub/firebrick-h"
           when /oraclelinux/
             "stub/firebrick-o"
           when /flatcar|containerlinux|container linux/
             "coreos"
           when /flatcar/
             "stub/darkblue-f"
           when /rancheros/
             "rancheros"
           when /nxos/
             "stub/darkslateblue-n"
           when /xenserver/
             "stub/black-x"
           when /puppet/
             "stub/goldenrod-p"
           when /windows/
             "stub/steelblue-w"
           when /OpenWrt/i
             "openwrt"
           when /Raspbian/i
             "raspbian"
           when /almalinux/i
             "almalinux"
           when /amazon/i
             "amazon"
           else
             if record.family.blank?
               'stub/black-x'
             else
               record.family.downcase
             end