

@classmethod
def _get_or_insert(*args, **kwds):
    'Transactionally retrieves an existing entity or creates a new one.\n\n    Positional Args:\n      name: Key name to retrieve or create.\n\n    Keyword Args:\n      namespace: Optional namespace.\n      app: Optional app ID.\n      parent: Parent entity key, if any.\n      context_options: ContextOptions object (not keyword args!) or None.\n      **kwds: Keyword arguments to pass to the constructor of the model class\n        if an instance for the specified key name does not already exist. If\n        an instance with the supplied key_name and parent already exists,\n        these arguments will be discarded.\n\n    Returns:\n      Existing instance of Model class with the specified key name and parent\n      or a new one that has just been created.\n    '
    (cls, args) = (args[0], args[1:])
    return cls._get_or_insert_async(*kwds, **kwds).get_result()

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Model._get_or_insert/VarMisuse@44/319 `args`->`kwds`