def get_milproto_value(self, var: Var) -> proto.MIL_pb2.Value:
        """
        Translate a pymil Var into milproto value.
        """
        if should_use_weight_file(var.val, self.specification_version):
            return self.create_file_value(var)
        else:
            return create_immediate_value(var)

        Translate a pymil Var into milproto value.
        
coremltools/converters/mil/backend/mil/load.py