code: def get_instance(self, cls):
          
          binding = self._bindings.get(cls)
          if binding:
              return binding()
  
          # Try to create a runtime binding.
          with _BINDING_LOCK:
              binding = self._bindings.get(cls)
              if binding:
                  return binding()
  
              if not self._bind_in_runtime:
                  raise InjectorException('No binding was found for key=%s' % cls)
  
              if not callable(cls):
                  raise InjectorException(
                      'Cannot create a runtime binding, the key is not callable, key=%s' % cls)
  
              instance = cls()
              self._bindings[cls] = lambda: instance
  
              logger.debug('Created a runtime binding for key=%s, instance=%s', cls, instance)
              return instance
docs: Return an instance for a class.