def __init__(<EOL>self,<EOL>api_key=None,<EOL>host='<STR_LIT>',<EOL>impersonate_subuser=None):
from . import __version__<EOL>self.api_key = api_key or os.environ.get('<STR_LIT>')<EOL>self.impersonate_subuser = impersonate_subuser<EOL>self.host = host<EOL>self.version = __version__<EOL>self.useragent = '<STR_LIT>'.format(self.version)<EOL>self.client = python_http_client.Client(<EOL>host=self.host,<EOL>request_headers=self._default_headers,<EOL>version=<NUM_LIT:3>)<EOL>
Construct the Twilio SendGrid v3 API object.
Note that the underlying client is being set up during initialization,
therefore changing attributes in runtime will not affect HTTP client
behaviour.

:param api_key: Twilio SendGrid API key to use. If not provided, key will be
                read from environment variable "SENDGRID_API_KEY"
:type api_key: string
:param impersonate_subuser: the subuser to impersonate. Will be passed
                            by "On-Behalf-Of" header by underlying
                            client. See
                            https://sendgrid.com/docs/User_Guide/Settings/subusers.html
                            for more details
:type impersonate_subuser: string
:param host: base URL for API calls
:type host: string