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: json_data.rb
    path of file: ./repos/puppet/lib/puppet/functions
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# The `json_data` is a hiera 5 `data_hash` data provider function.
# See [the 
    
  def json_data(options, context)
    path = options['path']
    context.cached_file_data(path) do |content|
      Puppet::Util::Json.load(content)
    rescue Puppet::Util::Json::ParseError => ex
      # Filename not included in message, so we add it here.
      raise Puppet::DataBinding::LookupError, "Unable to parse (%{path}): %{message}" % { path: path, message: ex.message }
    end
  end