def find_loader(module_name)
    if module_name.nil? || EMPTY_STRING == module_name
      # Use the public environment loader
      public_environment_loader
    else
      # TODO : Later check if definition is private, and then add it to private_loader_for_module
      #
      loader = public_loader_for_module(module_name)
      if loader.nil?
        raise Puppet::ParseError, _("Internal Error: did not find public loader for module: '%{module_name}'") % { module_name: module_name }
      end
      loader
    end
  end
def find_loader(module_name)
    if module_name.nil? || EMPTY_STRING == module_name
      # Use the public environment loader
      public_environment_loader
    else
      # TODO : Later check if definition is private, and then add it to private_loader_for_module
      #
      loader = public_loader_for_module(module_name)
      if loader.nil?
        raise Puppet::ParseError, _("Internal Error: did not find public loader for module: '%{module_name}'") % { module_name: module_name }
      end
      loader
    end
  end
Finds the appropriate loader for the given `module_name`, or for the environment in case `module_name`
 is `nil` or empty.

 @param module_name [String,nil] the name of the module
 @return [Loader::Loader] the found loader
 @raise [Puppet::ParseError] if no loader can be found
 @api private