<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _show_shortcuts(shortcuts, name=None):
 """Display shortcuts."""

    name = name or ''
    print('')
    if name:
        name = ' for ' + name
    print('Keyboard shortcuts' + name)
    for name in sorted(shortcuts):
        shortcut = _get_shortcut_string(shortcuts[name])
        if not name.startswith('_'):
            print('- {0:<40}: {1:s}'.format(name, shortcut))