module T::Private::Methods::CallValidation

def self.create_validator_method(mod, original_method, method_sig, original_visibility)

def self.create_validator_method(mod, original_method, method_sig, original_visibility)
  has_fixed_arity = method_sig.kwarg_types.empty? && !method_sig.has_rest && !method_sig.has_keyrest &&
    original_method.parameters.all? {|(kind, _name)| kind == :req}
  ok_for_fast_path = has_fixed_arity && !method_sig.bind && method_sig.arg_types.length < 5 && is_allowed_to_have_fast_path
  all_args_are_simple = ok_for_fast_path && method_sig.arg_types.all? {|_name, type| type.is_a?(T::Types::Simple)}
  simple_method = all_args_are_simple && method_sig.return_type.is_a?(T::Types::Simple)
  simple_procedure = all_args_are_simple && method_sig.return_type.is_a?(T::Private::Types::Void)
  T::Configuration.without_ruby_warnings do
    T::Private::DeclState.current.without_on_method_added do
      if simple_method
        create_validator_method_fast(mod, original_method, method_sig, original_visibility)
      elsif simple_procedure
        create_validator_procedure_fast(mod, original_method, method_sig, original_visibility)
      elsif ok_for_fast_path && method_sig.return_type.is_a?(T::Private::Types::Void)
        create_validator_procedure_medium(mod, original_method, method_sig, original_visibility)
      elsif ok_for_fast_path
        create_validator_method_medium(mod, original_method, method_sig, original_visibility)
      else
        create_validator_slow(mod, original_method, method_sig, original_visibility)
      end
    end
    mod.send(original_visibility, method_sig.method_name)
  end
end

def self.create_validator_method_fast(mod, original_method, method_sig, original_visibility)

def self.create_validator_method_fast(mod, original_method, method_sig, original_visibility)
  if method_sig.return_type.is_a?(T::Private::Types::Void)
    raise 'Should have used create_validator_procedure_fast'
  end
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_method_fast0(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type)
  elsif method_sig.arg_types.length == 1
    create_validator_method_fast1(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type)
  elsif method_sig.arg_types.length == 2
    create_validator_method_fast2(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type)
  elsif method_sig.arg_types.length == 3
    create_validator_method_fast3(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type)
  elsif method_sig.arg_types.length == 4
    create_validator_method_fast4(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type,
                                  method_sig.arg_types[3][1].raw_type)
  else
    raise 'should not happen'
  end
end

def self.create_validator_method_fast(mod, original_method, method_sig, original_visibility)

def self.create_validator_method_fast(mod, original_method, method_sig, original_visibility)
  if method_sig.return_type.is_a?(T::Private::Types::Void)
    raise 'Should have used create_validator_procedure_fast'
  end
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_method_fast0(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type)
  elsif method_sig.arg_types.length == 1
    create_validator_method_fast1(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type)
  elsif method_sig.arg_types.length == 2
    create_validator_method_fast2(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type)
  elsif method_sig.arg_types.length == 3
    create_validator_method_fast3(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type)
  elsif method_sig.arg_types.length == 4
    create_validator_method_fast4(mod, original_method, method_sig, original_visibility, method_sig.return_type.raw_type,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type,
                                  method_sig.arg_types[3][1].raw_type)
  else
    raise 'should not happen'
  end
end

def self.create_validator_method_fast0(mod, original_method, method_sig, original_visibility, return_type)

def self.create_validator_method_fast0(mod, original_method, method_sig, original_visibility, return_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(&blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast0(mod, original_method, method_sig, original_visibility, return_type)

def self.create_validator_method_fast0(mod, original_method, method_sig, original_visibility, return_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)

def self.create_validator_method_fast1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)

def self.create_validator_method_fast1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)

def self.create_validator_method_fast2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)

def self.create_validator_method_fast2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)

def self.create_validator_method_fast3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, arg2, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)

def self.create_validator_method_fast3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, arg2, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_method_fast4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3.is_a?(arg3_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, arg2, arg3, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_fast4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_method_fast4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3.is_a?(arg3_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, arg2, arg3, &blk)
    unless return_value.is_a?(return_type)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium(mod, original_method, method_sig, original_visibility)

def self.create_validator_method_medium(mod, original_method, method_sig, original_visibility)
  if method_sig.return_type.is_a?(T::Private::Types::Void)
    raise 'Should have used create_validator_procedure_medium'
  end
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_method_medium0(mod, original_method, method_sig, original_visibility, method_sig.return_type)
  elsif method_sig.arg_types.length == 1
    create_validator_method_medium1(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1])
  elsif method_sig.arg_types.length == 2
    create_validator_method_medium2(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1])
  elsif method_sig.arg_types.length == 3
    create_validator_method_medium3(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1])
  elsif method_sig.arg_types.length == 4
    create_validator_method_medium4(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1],
                                  method_sig.arg_types[3][1])
  else
    raise 'should not happen'
  end
end

def self.create_validator_method_medium(mod, original_method, method_sig, original_visibility)

def self.create_validator_method_medium(mod, original_method, method_sig, original_visibility)
  if method_sig.return_type.is_a?(T::Private::Types::Void)
    raise 'Should have used create_validator_procedure_medium'
  end
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_method_medium0(mod, original_method, method_sig, original_visibility, method_sig.return_type)
  elsif method_sig.arg_types.length == 1
    create_validator_method_medium1(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1])
  elsif method_sig.arg_types.length == 2
    create_validator_method_medium2(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1])
  elsif method_sig.arg_types.length == 3
    create_validator_method_medium3(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1])
  elsif method_sig.arg_types.length == 4
    create_validator_method_medium4(mod, original_method, method_sig, original_visibility, method_sig.return_type,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1],
                                  method_sig.arg_types[3][1])
  else
    raise 'should not happen'
  end
end

def self.create_validator_method_medium0(mod, original_method, method_sig, original_visibility, return_type)

def self.create_validator_method_medium0(mod, original_method, method_sig, original_visibility, return_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(&blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium0(mod, original_method, method_sig, original_visibility, return_type)

def self.create_validator_method_medium0(mod, original_method, method_sig, original_visibility, return_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)

def self.create_validator_method_medium1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)

def self.create_validator_method_medium1(mod, original_method, method_sig, original_visibility, return_type, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)

def self.create_validator_method_medium2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)

def self.create_validator_method_medium2(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)

def self.create_validator_method_medium3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, arg2, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)

def self.create_validator_method_medium3(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, arg2, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_method_medium4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3_type.valid?(arg3)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind(self).call(arg0, arg1, arg2, arg3, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_method_medium4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_method_medium4(mod, original_method, method_sig, original_visibility, return_type, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3_type.valid?(arg3)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    return_value = original_method.bind_call(self, arg0, arg1, arg2, arg3, &blk)
    unless return_type.valid?(return_value)
      message = method_sig.return_type.error_message_for_obj(return_value)
      if message
        CallValidation.report_error(
          method_sig,
          message,
          'Return value',
          nil,
          method_sig.return_type,
          return_value,
          caller_offset: -1
        )
      end
    end
    return_value
  end
end

def self.create_validator_procedure_fast(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_fast(mod, original_method, method_sig, original_visibility)
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)
  elsif method_sig.arg_types.length == 1
    create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type)
  elsif method_sig.arg_types.length == 2
    create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type)
  elsif method_sig.arg_types.length == 3
    create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type)
  elsif method_sig.arg_types.length == 4
    create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type,
                                  method_sig.arg_types[3][1].raw_type)
  else
    raise 'should not happen'
  end
end

def self.create_validator_procedure_fast(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_fast(mod, original_method, method_sig, original_visibility)
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)
  elsif method_sig.arg_types.length == 1
    create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type)
  elsif method_sig.arg_types.length == 2
    create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type)
  elsif method_sig.arg_types.length == 3
    create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type)
  elsif method_sig.arg_types.length == 4
    create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1].raw_type,
                                  method_sig.arg_types[1][1].raw_type,
                                  method_sig.arg_types[2][1].raw_type,
                                  method_sig.arg_types[3][1].raw_type)
  else
    raise 'should not happen'
  end
end

def self.create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(&blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_fast0(mod, original_method, method_sig, original_visibility)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility, arg0_type)

def self.create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility, arg0_type)

def self.create_validator_procedure_fast1(mod, original_method, method_sig, original_visibility, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)

def self.create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)

def self.create_validator_procedure_fast2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)

def self.create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, arg2, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)

def self.create_validator_procedure_fast3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, arg2, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3.is_a?(arg3_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, arg2, arg3, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_procedure_fast4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0.is_a?(arg0_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1.is_a?(arg1_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2.is_a?(arg2_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3.is_a?(arg3_type)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, arg2, arg3, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_medium(mod, original_method, method_sig, original_visibility)
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)
  elsif method_sig.arg_types.length == 1
    create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1])
  elsif method_sig.arg_types.length == 2
    create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1])
  elsif method_sig.arg_types.length == 3
    create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1])
  elsif method_sig.arg_types.length == 4
    create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1],
                                  method_sig.arg_types[3][1])
  else
    raise 'should not happen'
  end
end

def self.create_validator_procedure_medium(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_medium(mod, original_method, method_sig, original_visibility)
  # trampoline to reduce stack frame size
  if method_sig.arg_types.empty?
    create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)
  elsif method_sig.arg_types.length == 1
    create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1])
  elsif method_sig.arg_types.length == 2
    create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1])
  elsif method_sig.arg_types.length == 3
    create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1])
  elsif method_sig.arg_types.length == 4
    create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility,
                                  method_sig.arg_types[0][1],
                                  method_sig.arg_types[1][1],
                                  method_sig.arg_types[2][1],
                                  method_sig.arg_types[3][1])
  else
    raise 'should not happen'
  end
end

def self.create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(&blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)

def self.create_validator_procedure_medium0(mod, original_method, method_sig, original_visibility)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |&blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility, arg0_type)

def self.create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility, arg0_type)

def self.create_validator_procedure_medium1(mod, original_method, method_sig, original_visibility, arg0_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)

def self.create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)

def self.create_validator_procedure_medium2(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)

def self.create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, arg2, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)

def self.create_validator_procedure_medium3(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, arg2, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3_type.valid?(arg3)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind(self).call(arg0, arg1, arg2, arg3, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)

def self.create_validator_procedure_medium4(mod, original_method, method_sig, original_visibility, arg0_type, arg1_type, arg2_type, arg3_type)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |arg0, arg1, arg2, arg3, &blk|
    # This method is a manually sped-up version of more general code in `validate_call`
    unless arg0_type.valid?(arg0)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[0][1].error_message_for_obj(arg0),
        'Parameter',
        method_sig.arg_types[0][0],
        arg0_type,
        arg0,
        caller_offset: -1
      )
    end
    unless arg1_type.valid?(arg1)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[1][1].error_message_for_obj(arg1),
        'Parameter',
        method_sig.arg_types[1][0],
        arg1_type,
        arg1,
        caller_offset: -1
      )
    end
    unless arg2_type.valid?(arg2)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[2][1].error_message_for_obj(arg2),
        'Parameter',
        method_sig.arg_types[2][0],
        arg2_type,
        arg2,
        caller_offset: -1
      )
    end
    unless arg3_type.valid?(arg3)
      CallValidation.report_error(
        method_sig,
        method_sig.arg_types[3][1].error_message_for_obj(arg3),
        'Parameter',
        method_sig.arg_types[3][0],
        arg3_type,
        arg3,
        caller_offset: -1
      )
    end
    # The following line breaks are intentional to show nice pry message
    # PRY note:
    # this code is sig validation code.
    # Please issue `finish` to step out of it
    original_method.bind_call(self, arg0, arg1, arg2, arg3, &blk)
    T::Private::Types::Void::VOID
  end
end

def self.create_validator_slow(mod, original_method, method_sig, original_visibility)

def self.create_validator_slow(mod, original_method, method_sig, original_visibility)
  T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility) do |*args, &blk|
    CallValidation.validate_call(self, original_method, method_sig, args, blk)
  end
end

def self.disable_fast_path

def self.disable_fast_path
  @is_allowed_to_have_fast_path = false
end

def self.is_allowed_to_have_fast_path

def self.is_allowed_to_have_fast_path
  @is_allowed_to_have_fast_path
end

def self.report_error(method_sig, error_message, kind, name, type, value, caller_offset: 0)

def self.report_error(method_sig, error_message, kind, name, type, value, caller_offset: 0)
  caller_loc = T.must(caller_locations(3 + caller_offset, 1))[0]
  definition_file, definition_line = method_sig.method.source_location
  pretty_message = "#{kind}#{name ? " '#{name}'" : ''}: #{error_message}\n" \
    "Caller: #{caller_loc.path}:#{caller_loc.lineno}\n" \
    "Definition: #{definition_file}:#{definition_line}"
  T::Configuration.call_validation_error_handler(
    method_sig,
    message: error_message,
    pretty_message: pretty_message,
    kind: kind,
    name: name,
    type: type,
    value: value,
    location: caller_loc
  )
end

def self.validate_call(instance, original_method, method_sig, args, blk)

def self.validate_call(instance, original_method, method_sig, args, blk)
  # This method is called for every `sig`. It's critical to keep it fast and
  # reduce number of allocations that happen here.
  if method_sig.bind
    message = method_sig.bind.error_message_for_obj(instance)
    if message
      CallValidation.report_error(
        method_sig,
        message,
        'Bind',
        nil,
        method_sig.bind,
        instance
      )
    end
  end
  # NOTE: We don't bother validating for missing or extra kwargs;
  # the method call itself will take care of that.
  method_sig.each_args_value_type(args) do |name, arg, type|
    message = type.error_message_for_obj(arg)
    if message
      CallValidation.report_error(
        method_sig,
        message,
        'Parameter',
        name,
        type,
        arg,
        caller_offset: 2
      )
    end
  end
  if method_sig.block_type
    message = method_sig.block_type.error_message_for_obj(blk)
    if message
      CallValidation.report_error(
        method_sig,
        message,
        'Block parameter',
        method_sig.block_name,
        method_sig.block_type,
        blk
      )
    end
  end
  # The following line breaks are intentional to show nice pry message
  # PRY note:
  # this code is sig validation code.
  # Please issue `finish` to step out of it
  return_value = T::Configuration::AT_LEAST_RUBY_2_7 ? original_method.bind_call(instance, *args, &blk) : original_method.bind(instance).call(*args, &blk)
  # The only type that is allowed to change the return value is `.void`.
  # It ignores what you returned and changes it to be a private singleton.
  if method_sig.return_type.is_a?(T::Private::Types::Void)
    T::Private::Types::Void::VOID
  else
    message = method_sig.return_type.error_message_for_obj(return_value)
    if message
      CallValidation.report_error(
        method_sig,
        message,
        'Return value',
        nil,
        method_sig.return_type,
        return_value,
      )
    end
    return_value
  end
end

def self.visibility_method_name(mod, name)

`name` must be an instance method (for class methods, pass in mod.singleton_class)
def self.visibility_method_name(mod, name)
d_defined?(name)
_method_defined?(name)
ethod_defined?(name)
ew("undefined method `#{name}` for `#{mod}`")

def self.wrap_method_if_needed(mod, method_sig, original_method)

Returns:
  • (UnboundMethod) - the new wrapper method (or the original one if we didn't wrap it)

Parameters:
  • method_sig (T::Private::Methods::Signature) --
def self.wrap_method_if_needed(mod, method_sig, original_method)
  original_visibility = visibility_method_name(mod, method_sig.method_name)
  if method_sig.mode == T::Private::Methods::Modes.abstract
    T::Private::ClassUtils.replace_method(mod, method_sig.method_name) do |*args, &blk|
      # TODO: write a cop to ensure that abstract methods have an empty body
      #
      # We allow abstract methods to be implemented by things further down the ancestor chain.
      # So, if a super method exists, call it.
      if defined?(super)
        super(*args, &blk)
      else
        raise NotImplementedError.new(
          "The method `#{method_sig.method_name}` on #{mod} is declared as `abstract`. It does not have an implementation."
        )
      end
    end
  # Do nothing in this case; this method was not wrapped in _on_method_added.
  elsif method_sig.defined_raw
  # Note, this logic is duplicated (intentionally, for micro-perf) at `Methods._on_method_added`,
  # make sure to keep changes in sync.
  # This is a trapdoor point for each method:
  # if a given method is wrapped, it stays wrapped; and if not, it's never wrapped.
  # (Therefore, we need the `@wrapped_tests_with_validation` check in `T::RuntimeLevels`.)
  elsif method_sig.check_level == :always || (method_sig.check_level == :tests && T::Private::RuntimeLevels.check_tests?)
    create_validator_method(mod, original_method, method_sig, original_visibility)
  else
    T::Configuration.without_ruby_warnings do
      # get all the shims out of the way and put back the original method
      T::Private::DeclState.current.without_on_method_added do
        T::Private::ClassUtils.def_with_visibility(mod, method_sig.method_name, original_visibility, original_method)
      end
    end
  end
  # Return the newly created method (or the original one if we didn't replace it)
  mod.instance_method(method_sig.method_name)
end