code: def update_or_create(self, interface):
          
          created, modified = (False, False)
          try:
              intf = self._engine.interface.get(
                  interface.interface_id)
              interface, updated = intf.update_interface(interface)
              if updated:
                  modified = True
          except InterfaceNotFound:
              self._engine.add_interface(interface)
              interface = self._engine.interface.get(interface.interface_id)
              created = True
          
          return interface, modified, created
docs: Collections class update or create method that can be used as a
          shortcut to updating or creating an interface. The interface must
          first be defined and provided as the argument. The interface method
          must have an `update_interface` method which resolves differences and
          adds as necessary.
          
          :param Interface interface: an instance of an interface type, either
              PhysicalInterface or TunnelInterface
          :raises EngineCommandFailed: Failed to create new interface
          :raises UpdateElementFailed: Failure to update element with reason
          :rtype: tuple
          :return: A tuple with (Interface, modified, created), where created and
              modified are booleans indicating the operations performed