def split(s: str, sep: str, limit: int = -1):
    """
    Returns an array of tokens created by splitting the input string
    according to a provided separator pattern. The result can optionally
    be constrained to return at most limit tokens.
    """
    return s.split(sep, limit)