intersect = lambda type: udf(lambda x, y: list(set(x) & set(y)) if x is not
    None and y is not None else None, ArrayType(type))
df = sc.parallelize([([1, 2, 3], [1, 2]), ([3, 4], [5, 6])]).toDF(['xs', 'ys'])
integer_intersect = intersect(IntegerType())
ARRAY_CONTAINS muliple values in pyspark