def METHOD_NAME(samples, hash_label_map):
    if isinstance(samples, np.ndarray):
        samples = samples.tolist()
    if isinstance(samples, list):
        return [METHOD_NAME(sample, hash_label_map) for sample in samples]
    else:
        if isinstance(samples, str):
            hash_ = hash_str_to_int32(samples)
            hash_label_map[hash_] = samples
        else:
            hash_ = samples
        return hash_