code: def load_spec(filename):
      """
      Load a protobuf model specification from file.
  
      Parameters
      ----------
      filename: str
          Location on disk (a valid file path) from which the file is loaded
          as a protobuf spec.
  
      Returns
      -------
      model_spec: Model_pb
          Protobuf representation of the model
  
      Examples
      --------
      .. sourcecode:: python
  
          >>> spec = coremltools.utils.load_spec('HousePricer.mlmodel')
  
      See Also
      --------
      save_spec
      """
      from ..proto import Model_pb2
  
      spec = Model_pb2.Model()
  
      with open(filename, "rb") as f:
          contents = f.read()
          spec.ParseFromString(contents)
          return spec
  
imports: import math
  import numpy
  import os
  import six
  import warnings
  import sys
  from coremltools.proto import Model_pb2
  from coremltools.models._deprecation import deprecated
  from .._deps import _HAS_SKLEARN
label_desc: Use image node_id 3 for calling a global function with example usage: load_spec(filename) and returns: spec