code: def find_database(client, id):
      """Find whether or not a CosmosDB database exists.
  
      Args:
          client (object): A pydocumentdb client object.
          id (str): Database ID.
  
      Returns:
          bool: True if the database exists, False otherwise.
      """
      databases = list(
          client.QueryDatabases(
              {
                  "query": "SELECT * FROM r WHERE r.id=@id",
                  "parameters": [{"name": "@id", "value": id}],
              }
          )
      )
      if len(databases) > 0:
          return True
      else:
          return False
  
imports: import pydocumentdb.errors
label_desc: Use image node_id 4 for calling a global function with example usage: find_database(client, id) and returns: True, False