def output_ami_permissions(perms=None):
    """
    @type perms: dict
    """
    out = ''
    for i, launch_perm in enumerate(perms.get('LaunchPermissions')):
        if 'UserId' in launch_perm:
            out += 'UserId: {0}'.format(launch_perm.get('UserId'))
        if i < len(perms.get('LaunchPermissions')) - 1:
            out += '\n'
    return out
