<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def feature_hash(feature, dim, seed=123):
 """Feature hashing. Args: feature (str):
 Target feature represented as string. dim (int):
 Number of dimensions for a hash value. seed (float):
 Seed of a MurmurHash3 hash function. Returns: numpy 1d array: one-hot-encoded feature vector for `s`. """

    vec = np.zeros(dim)
    i = mmh3.hash(feature, seed) % dim
    vec[i] = 1
    return vec