def METHOD_NAME(value):
    """Converts text values into `utf-8` or `ascii` strings
    """
    if LooseVersion(np.__version__) < LooseVersion('1.7.0'):
        if (isinstance(value, (six.text_type, np.unicode))):
            value = value.encode('utf-8', 'ignore').decode('utf-8')
    if isinstance(value, (np.bytes_, six.binary_type)):
        value = value.decode(encoding='utf-8')
    elif not isinstance(value, (np.str_, six.string_types)):
        value = str(value)
    return value