def METHOD_NAME(self, strings):
    length = 3
    # although we are utf-8 encoding below to avoid python exceptions,
    # StringPrefix op deals with byte-length prefixes, which may produce
    # an invalid utf-8 string. The goal here is just to avoid python
    # complaining about the unicode -> str conversion.
    strings = np.array(
        [a.encode('utf-8') for a in strings], dtype=np.object
    )
    def string_prefix_ref(strings):
        return (
            np.array([a[:length] for a in strings], dtype=object),
        )
    op = core.CreateOperator(
        'StringPrefix',
        ['strings'],
        ['stripped'],
        length=length)
    self.assertReferenceChecks(
        hu.cpu_do,
        op,
        [strings],
        string_prefix_ref)