def create_session(token=None):
if token is None:<EOL><INDENT>token = os.environ.get('<STR_LIT>', None)<EOL><DEDENT>gh_session = github3.login(token=token)<EOL>if gh_session is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>return gh_session<EOL>
Create a github3.py session connected to GitHub.com

If token is not provided, will attempt to use the GITHUB_API_TOKEN
environment variable if present.