def get_conn(self):
conn = self.get_connection(self.cloudant_conn_id)<EOL>self._validate_connection(conn)<EOL>cloudant_session = cloudant(user=conn.login, passwd=conn.password, account=conn.host)<EOL>return cloudant_session<EOL>
Opens a connection to the cloudant service and closes it automatically if used as context manager.

.. note::
    In the connection form:
    - 'host' equals the 'Account' (optional)
    - 'login' equals the 'Username (or API Key)' (required)
    - 'password' equals the 'Password' (required)

:return: an authorized cloudant session context manager object.
:rtype: cloudant