def get_doc(doc_id, db_name, server_url='<STR_LIT>', rev=None):
db = get_server(server_url)[db_name]<EOL>if rev:<EOL><INDENT>headers, response = db.resource.get(doc_id, rev=rev)<EOL>return couchdb.client.Document(response)<EOL><DEDENT>return db[doc_id]<EOL>
Return a CouchDB document, given its ID, revision and database name.