<gh_stars>0
import string

WILDCARD = '#'


def replace_nonprintable(s):
    if isinstance(s, str):
        return ''.join([x if x in string.printable else WILDCARD for x in s])
    return None

import string

WILDCARD = '#'


def replace_nonprintable(s):
    if isinstance(s, str):
        return ''.join([x if x in string.printable else WILDCARD for x in s])
    return None