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: example.rb
    path of file: ./repos/sendgrid-ruby/examples/helpers/eventwebhook
    
    the code of the file until where you have to start completion: require 'sengrid-ruby'
include SendGrid

def is_valid_signature(request)
  public_key = 'base64-encoded public key'

  event_webhook = SendGrid::EventWebhook.new
  ec_public_key = event_webhook.convert_public_key_to_ecdsa(public
    
def is_valid_signature(request)
  public_key = 'base64-encoded public key'

  event_webhook = SendGrid::EventWebhook.new
  ec_public_key = event_webhook.convert_public_key_to_ecdsa(public_key)

  event_webhook.verify_signature(
    ec_public_key,
    request.body.read,
    request.env[SendGrid::EventWebhookHeader::SIGNATURE],
    request.env[SendGrid::EventWebhookHeader::TIMESTAMP]
  )
end