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: fiddle_backend.rb
    path of file: ./repos/truffleruby/lib/truffle/truffle
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# truffleruby_primitives: true

# Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 2.0, or
# GNU General Public License version 2, or
# GNU Lesser General Public License version 2.1.

module Truffle::FiddleBackend

  SIZEOF_CHAR   = Primitive.pointer_find_type_
    
  def self.type_to_nfi(type)
    case type
    when Fiddle::TYPE_VOID
      'VOID'
    when Fiddle::TYPE_VOIDP
      'POINTER'
    when Fiddle::TYPE_CHAR
      CHAR_NFI_TYPE
    when -Fiddle::TYPE_CHAR
      UCHAR_NFI_TYPE
    when Fiddle::TYPE_SHORT
      SHORT_NFI_TYPE
    when -Fiddle::TYPE_SHORT
      USHORT_NFI_TYPE
    when Fiddle::TYPE_INT
      INT_NFI_TYPE
    when -Fiddle::TYPE_INT
      UINT_NFI_TYPE
    when Fiddle::TYPE_LONG, Fiddle::TYPE_LONG_LONG
      LONG_NFI_TYPE
    when -Fiddle::TYPE_LONG, -Fiddle::TYPE_LONG_LONG
      ULONG_NFI_TYPE
    when Fiddle::TYPE_FLOAT
      'FLOAT'
    when Fiddle::TYPE_DOUBLE
      'DOUBLE'
    else
      raise NotImplementedError, "#{type} not implemented"
    end