def summary(date=None, token='<STR_LIT>', version='<STR_LIT>'):
if date:<EOL><INDENT>if isinstance(date, str):<EOL><INDENT>return _getJson('<STR_LIT>' + date, token, version)<EOL><DEDENT>elif isinstance(date, datetime):<EOL><INDENT>return _getJson('<STR_LIT>' + date.strftime('<STR_LIT>'), token, version)<EOL><DEDENT>else:<EOL><INDENT>raise PyEXception("<STR_LIT>" % str(type(date)), token, version)<EOL><DEDENT><DEDENT>return _getJson('<STR_LIT>', token, version)<EOL>
https://iexcloud.io/docs/api/#stats-historical-summary

    Args:
        token (string); Access token
        version (string); API version

    Returns:
        dict: result