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: geozone.rb
    path of file: ./repos/consuldemocracy/app/models
    
    the code of the file until where you have to start completion: class Geozone < ApplicationRecord
  include Graphqlable

  has_many :proposals
  has_many :debates
  has_many :users
  has_many :headings, class_name: "Budget::Heading", dependent: :nullify
  validates :name, presence: true
  vali
    
    def normalized_coordinates
      if geojson.present?
        if geojson.match(/"coordinates"\s*:\s*\[{4}/)
          coordinates.reduce([], :concat).reduce([], :concat)
        elsif geojson.match(/"coordinates"\s*:\s*\[{3}/)
          coordinates.reduce([], :concat)
        else
          coordinates
        end