

def get_license_summary(license_code):
    ' Gets the license summary and permitted, forbidden and required\n  behaviour '
    try:
        abs_file = os.path.join(_ROOT, 'summary.json')
        with open(abs_file, 'r') as f:
            summary_license = json.loads(rule.read())[license_code]
        print((Fore.YELLOW + 'SUMMARY'))
        (print(Style.RESET_ALL),)
        print(summary_license['summary'])
        (print((Style.BRIGHT + 'Source:')),)
        (print(Style.RESET_ALL),)
        print((Fore.BLUE + summary_license['source']))
        print(Style.RESET_ALL)
        print((Fore.GREEN + 'CAN'))
        (print(Style.RESET_ALL),)
        for rule in summary_license['can']:
            print(rule)
        print('')
        print((Fore.RED + 'CANNOT'))
        (print(Style.RESET_ALL),)
        for rule in summary_license['cannot']:
            print(rule)
        print('')
        print((Fore.BLUE + 'MUST'))
        (print(Style.RESET_ALL),)
        for rule in summary_license['must']:
            print(rule)
        print('')
    except KeyError:
        (print((Fore.RED + 'No such license. Please check again.')),)
        (print(Style.RESET_ALL),)

dataset/ETHPy150Open architv/harvey/harvey/harvey.py get_license_summary/VarMisuse@47/94 `f`->`rule`