def docker_client():
cert_path = os.environ.get('<STR_LIT>', '<STR_LIT>')<EOL>if cert_path == '<STR_LIT>':<EOL><INDENT>cert_path = os.path.join(os.environ.get('<STR_LIT>', '<STR_LIT>'), '<STR_LIT>')<EOL><DEDENT>base_url = os.environ.get('<STR_LIT>')<EOL>tls_config = None<EOL>if os.environ.get('<STR_LIT>', '<STR_LIT>') != '<STR_LIT>':<EOL><INDENT>parts = base_url.split('<STR_LIT>', <NUM_LIT:1>)<EOL>base_url = '<STR_LIT>' % ('<STR_LIT>', parts[<NUM_LIT:1>])<EOL>client_cert = (os.path.join(cert_path, '<STR_LIT>'),<EOL>os.path.join(cert_path, '<STR_LIT>'))<EOL>ca_cert = os.path.join(cert_path, '<STR_LIT>')<EOL>tls_config = tls.TLSConfig(<EOL>ssl_version=ssl.PROTOCOL_TLSv1,<EOL>verify=True,<EOL>assert_hostname=False,<EOL>client_cert=client_cert,<EOL>ca_cert=ca_cert,<EOL>)<EOL><DEDENT>timeout = int(os.environ.get('<STR_LIT>', <NUM_LIT>))<EOL>return Client(<EOL>base_url=base_url, tls=tls_config, version='<STR_LIT>', timeout=timeout<EOL>)<EOL>
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker client.