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: draw_shape.rb
    path of file: ./repos/thinreports-generator/lib/thinreports/basic_report/generator/pdf/document
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Thinreports
  module BasicReport
    module Generator
      class PDF
        module DrawShape
          # @param [Thinreports::BasicReport::Core::Shape::TextBlock::Internal] shape
          # @param [Numeric] height (nil) It will be used as rendering height if 
    
          def shape_iblock_dimenions(shape)
            return nil if blank_value?(shape.src)

            x, y, w, h = shape.format.attributes.values_at('x', 'y', 'width', 'height')
            style = shape.style.finalized_styles

            image_dimensions(
              shape.src, x, y, w, h,
              position_x: image_position_x(style['position-x']),
              position_y: image_position_y(style['position-y'])
            )
          end