code: def contains(bank, key):
      '''
      Checks if the specified bank contains the specified key.
      '''
      if key is None:
          return True  # any key could be a branch and a leaf at the same time in Consul
      else:
          try:
              c_key = '{0}/{1}'.format(bank, key)
              _, value = api.kv.get(c_key)
          except Exception as exc:
              raise SaltCacheError(
                  'There was an error getting the key, {0}: {1}'.format(
                      c_key, exc
                  )
              )
          return value is not Nonf contains(bank, key):
      '''
      Checks if the specified bank contains the specified key.
      '''
      if key is None:
          return True  # any key could be a branch and a leaf at the same time in Consul
      else:
          try:
              c_key = '{0}/{1}'.format(bank, key)
              _, value = api.kv.get(c_key)
          except Exception as exc:
              raise SaltCacheError(
                  'There was an error getting the key, {0}: {1}'.format(
                      c_key, exc
                  )
              )
          return value is not None
docs: Checks if the specified bank contains the specified key.