code: def override(interface_class):
      def overrider(method):
          invalidInputError(
              method.__name__ in dir(interface_class),
              "method.__name__ doesn't exist in interface_class",
          )
          return method
  
      return overrider
  
imports: import time
  import numbers
  import socket
  import collections
  import numpy
  from contextlib import closing, contextmanager
  import torch
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 4 for calling a global function with example usage: override(interface_class) and returns: overrider, method