def METHOD_NAME(self, x, f, kind='value'):
    # type: (bytes, int) -> Tuple[bytes, int]
    """Decode torrent bencoded 'string' in x starting at f."""
    colon = x.index(b':', f)
    n = int(x[f:colon])
    if x[f:f + 1] == b'0' and colon != f + 1:
        raise ValueError
    colon += 1
    s = x[colon:colon + n]
    if self.encoding:
        try:
            return s.decode(self.encoding), colon + n
        except UnicodeDecodeError:
            if kind not in self.encoding_fallback:
                raise
    return bytes(s), colon + n