human
Complete the below
def common_dtype(arrs):

    ''''Use numpy to find the common dtype for a list of ndarrays.
    Only allow arrays within the following fundamental numpy data types:
    ``np.bool``, ``np.object``, ``np.number``, ``np.character``, ``np.void``
    Parameters
    arrs : list of ndarray objects
    Arrays for which to find the common dtype'
    '''

Can you provide a Python code to find the common dtype for a list of ndarrays?
assistant
#Here is Python code to find the common dtype for a list of ndarrays.
    def dtype(arr):
        return getattr(arr, u'dtype', np.dtype(u'O'))
    np_types = (np.bool_, np.object_, np.number, np.character, np.void)
    uniq_types = set((tuple((issubclass(dtype(arr).type, np_type) for np_type in np_types)) for arr in arrs))
    if (len(uniq_types) > 1):
        incompat_types = [dtype(arr).name for arr in arrs]
        tme = MergeConflictError(u'Arrays    have    incompatible    types    {0}'.format(incompat_types))
        tme._incompat_types = incompat_types
        raise tme
    arrs = [np.empty(1, dtype=dtype(arr)) for arr in arrs]
    for (i, arr) in enumerate(arrs):
        if (arr.dtype.kind in (u'S', u'U')):
            arrs[i] = [((u'0' if (arr.dtype.kind == u'U') else '0') * arr.itemsize)]
    arr_common = np.array([arr[0] for arr in arrs])
    return arr_common.dtype.str