def in_array(needles, haystack):
    """
    Returns true if any of the needles are in the haystack.
    Returns false if none of needles is found in the haystack.

    Args:
        needles (array) A list of values to look for. Accepts a single value.
        haystack (array) A list of values to look in.

    Returns:
        True if a needle is found in haystack, false otherwise.
    """
    # For flexibility, allow a single value in place of a list.
    if not isinstance(needles, list):
        needles = [needles]
    if not isinstance(haystack, list):
        haystack = [haystack]

    # Look for all the needles and return true if a needle isfound.
    for needle in needles:
        if needle in haystack:
            return True
    return False