code: def _load_file_value(context, filevalue_spec, dtype):
      if BlobReader is None:
          raise RuntimeError("BlobReader not loaded")
      if not isinstance(filevalue_spec, pm.Value.BlobFileValue):
          raise TypeError("Invalid BlobFileValue spec object")
  
      filename = os.path.join(
          context.weights_dir, filevalue_spec.fileName.split("/")[-1]
      )
      offset = filevalue_spec.offset
  
      if filename in context.blob_reader_from_filename:
          blob_reader = context.blob_reader_from_filename[filename]
      else:
          blob_reader = BlobReader(filename)
          context.blob_reader_from_filename[filename] = blob_reader
  
      if dtype == types.uint8:
          np_value = blob_reader.read_uint8_data(offset)
      elif dtype == types.int8:
          np_value = blob_reader.read_int8_data(offset)
      elif dtype == types.uint16:
          np_value = blob_reader.read_uint16_data(offset)
      elif dtype == types.int16:
          np_value = blob_reader.read_int16_data(offset)
      elif dtype == types.fp16:
          np_value_uint16 = blob_reader.read_fp16_data(offset)
          np_value = np.frombuffer(
              np_value_uint16.tobytes(), np.float16
          )
      elif dtype == types.fp32:
          np_value = blob_reader.read_float_data(offset)
      else:
          raise ValueError("Invalid dtype for blob file value type")
  
      return np_value
  
imports: import os
  import numpy
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.backend.mil import helper
  from coremltools.converters.mil.mil import Block
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, ListVar, Placeholder, Program, TupleInputType, Var, mil_list, types
  from coremltools.converters.mil.mil.block import curr_block
  from coremltools.converters.mil.mil.ops.registry import SSAOpRegistry
  from coremltools.proto import MIL_pb2
  from coremltools.proto import Model_pb2
  from .helper import proto_to_types
label_desc: Use image node_id 3 for calling a global function with example usage: _load_file_value(context, filevalue_spec, dtype) and returns: np_value