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: image.rb
    path of file: ./repos/mushroom-observer/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require(
    
  def init_image_from_local_file(file)
    @file = file
    raise("Weird: file.path is blank!") if file.path.blank?
    self.upload_temp_file = file.path
    self.upload_length    = file.size
    add_extra_attributes_from_file(file)
  end