code: def read_collection(client, dbid, id):
      """Read a CosmosDB collection.
  
      Args:
          client (object): A pydocumentdb client object.
          dbid (str): Database ID.
          id (str): Collection ID.
  
      Returns:
          object: A collection.
      """
      try:
          database_link = "dbs/" + dbid
          collection_link = database_link + "/colls/{0}".format(id)
          collection = client.ReadCollection(collection_link)
          return collection
      except errors.DocumentDBError as e:
          if e.status_code == 404:
              print(
                  "A collection with id '{0}' does not exist".format(id)
              )
          else:
              raise errors.HTTPFailure(e.status_code)
  
imports: import pydocumentdb.errors
label_desc: Use image node_id 2 for calling a global function with example usage: read_collection(client, dbid, id) and returns: collection