def __init__(self, mc_api=None, mc_user='<STR_LIT>', access_token=None, enabled=True, timeout=None,<EOL>request_hooks=None, request_headers=None):
super(MailChimpClient, self).__init__()<EOL>self.enabled = enabled<EOL>self.timeout = timeout<EOL>if access_token:<EOL><INDENT>self.auth = MailChimpOAuth(access_token)<EOL>self.base_url = self.auth.get_base_url() + '<STR_LIT>'<EOL><DEDENT>elif mc_api:<EOL><INDENT>if not re.match(r"<STR_LIT>", mc_api.split('<STR_LIT:->')[<NUM_LIT:0>]):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>self.auth = HTTPBasicAuth(mc_user, mc_api)<EOL>datacenter = mc_api.split('<STR_LIT:->').pop()<EOL>self.base_url = '<STR_LIT>'.format(datacenter)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>self.request_headers = request_headers or requests.utils.default_headers()<EOL>self.request_hooks = request_hooks or requests.hooks.default_hooks()<EOL>
Initialize the class with your optional user_id and required api_key.

If `enabled` is not True, these methods become no-ops. This is
particularly useful for testing or disabling with configuration.

:param mc_api: Mailchimp API key
:type mc_api: :py:class:`str`
:param mc_user: Mailchimp user id
:type mc_user: :py:class:`str`
:param access_token: The OAuth access token
:type access_token: :py:class:`str`
:param enabled: Whether the API should execute any requests
:type enabled: :py:class:`bool`
:param timeout: (optional) How long to wait for the server to send
    data before giving up, as a float, or a :ref:`(connect timeout,
    read timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param request_hooks: (optional) Hooks for :py:func:`requests.requests`.
:type request_hooks: :py:class:`dict`
:param request_headers: (optional) Headers for
    :py:func:`requests.requests`.
:type request_headers: :py:class:`dict`