Check if pairwise is exists.

    :param wallet_handle: wallet handler (created by open_wallet).
    :param their_did: encoded Did.
    :return: true - if pairwise is exists, false - otherwise
548408
async def is_pairwise_exists(wallet_handle: int,
                             their_did: str) -> bool:
    

    logger = logging.getLogger(__name__)
    logger.debug("is_pairwise_exists: >>> wallet_handle: %r, their_did: %r",
                 wallet_handle,
                 their_did)

    if not hasattr(is_pairwise_exists, "cb"):
        logger.debug("is_pairwise_exists: Creating callback")
        is_pairwise_exists.cb = create_cb(CFUNCTYPE(None, c_int32, c_int32, c_bool))

    c_wallet_handle = c_int32(wallet_handle)
    c_their_did = c_char_p(their_did.encode('utf-8'))

    res = await do_call('indy_is_pairwise_exists',
                        c_wallet_handle,
                        c_their_did,
                        is_pairwise_exists.cb)

    logger.debug("is_pairwise_exists: <<< res: %r", res)
    return res
482944
def key_exists(self, key):
        
        assert isinstance(key, str)
        cursor = self.conn.cursor()
        with contextlib.closing(cursor):
            cursor.execute('SELECT COUNT(*) FROM events WHERE uuid=?', (key,))
            res = cursor.fetchone()
            count = res[0]
        if count == 0:
            return False
        else:
            assert count in (0, 1), \
                "Duplicate event ids detected: {0}".format(count)
            return True
371950
def key_exists(key_id, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    r = {}
    try:
        key = conn.describe_key(key_id)
        # TODO: add to context cache
        r['result'] = True
    except boto.exception.BotoServerError as e:
        if isinstance(e, boto.kms.exceptions.NotFoundException):
            r['result'] = False
            return r
        r['error'] = __utils__['boto.get_error'](e)
    return r
313276
def has_key?(key)
      hashed_key = hash_key(key)
      unless (entry = @btree.get(hashed_key))
        return false
      end

      if entry.is_a?(PEROBS::Array)
        entry.each do |ae|
          return true if ae.key == key
        end
      else
        return true if entry.key == key
      end

      false
    end
207485
def exists(self):
        
        try:
            key = self.key
        except DoesNotExist:
            """
            If the object doesn't exists anymore, its PK is deleted, so the
            "self.key" call will raise a DoesNotExist exception. We catch it
            to return False, as the field doesn't exists too.
            """
            return False
        else:
            return self.connection.exists(key)
166584
def exists(self, **kwargs):
        """"""
        kwargs.pop('partition', None)
        kwargs['transform_name'] = True
        return self._exists(**kwargs)
78348
def exists(self):
        """"""

        try:
            self.s3_object.load()
            return True
        except botocore.exceptions.ClientError: return False
1075138
def has(self, key, mtime=None):
        
        v = self.__values.get(key, None)
        if not v:
            return False
        if self.check_modified_time:
            mtime = self._get_mtime(key, mtime)
            if mtime != self.__modified_times[key]:
                del self[key]
                return False
        return True
253195
def exists(cls, id):
        """"""
        return bool(redisco.get_client().exists(cls._key[str(id)]) or
                    redisco.get_client().sismember(cls._key['all'], str(id)))
374825
async def _seed2did(self) -> str:
        

        rv = None
        dids_with_meta = json.loads(await did.list_my_dids_with_meta(self.handle))  # list

        if dids_with_meta:
            for did_with_meta in dids_with_meta:  # dict
                if 'metadata' in did_with_meta:
                    try:
                        meta = json.loads(did_with_meta['metadata'])
                        if isinstance(meta, dict) and meta.get('seed', None) == self._seed:
                            rv = did_with_meta.get('did')
                    except json.decoder.JSONDecodeError:
                        continue  # it's not one of ours, carry on

        if not rv:  # seed not in metadata, generate did again on temp wallet
            temp_wallet = await Wallet(
                self._seed,
                '{}.seed2did'.format(self.name),
                None,
                {'auto-remove': True}).create()

            rv = temp_wallet.did
            await temp_wallet.remove()

        return rv
686384
def has_slave(self):
        ''''''
        slave = first(x for x in self.slaves.itervalues()
                      if not x.is_standalone)
        return slave is not None
1268827
@Override
    public Promise<Boolean> exists(String path) {
        return adapter.toPromise(handler -> vertx.fileSystem().exists(path, handler));
    }
894700
def has_key?(key)
      if :hash == self.type
        self.children.any? { |pair_node| pair_node.key.to_value == key }
      else
        raise Synvert::Core::MethodNotSupported.new "has_key? is not handled for #{self.debug_info}"
      end
    end
1185548
def exists(self, name):
        
        with self.pipe as pipe:
            return pipe.exists(self.redis_key(name))
88984
def watch(self, *keys):
        
        if self.explicit_transaction:
            raise RedisError("Cannot issue a WATCH after a MULTI")
        self.watching = True
        for key in keys:
            self._watched_keys[key] = deepcopy(self.mock_redis.redis.get(self.mock_redis._encode(key)))
65387
async def replace_keys_apply(wallet_handle: int,
                             did: str) -> None:
    

    logger = logging.getLogger(__name__)
    logger.debug("replace_keys_apply: >>> wallet_handle: %r, did: %r",
                 wallet_handle,
                 did)

    if not hasattr(replace_keys_apply, "cb"):
        logger.debug("replace_keys_apply: Creating callback")
        replace_keys_apply.cb = create_cb(CFUNCTYPE(None, c_int32, c_int32))

    c_wallet_handle = c_int32(wallet_handle)
    c_did = c_char_p(did.encode('utf-8'))

    await do_call('indy_replace_keys_apply',
                  c_wallet_handle,
                  c_did,
                  replace_keys_apply.cb)

    logger.debug("replace_keys_apply: <<<")
1360584
def can_compare_pairwise(self):
        
        if self.ndim != 2:
            return False

        return all(dt in DT.ALLOWED_PAIRWISE_TYPES for dt in self.dim_types)