<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dtype_repr(dtype):
 """Stringify ``dtype`` for ``repr`` with default for int and float."""

    dtype = np.dtype(dtype)
    if dtype == np.dtype(int):
        return "'int'"
    elif dtype == np.dtype(float):
        return "'float'"
    elif dtype == np.dtype(complex):
        return "'complex'"
    elif dtype.shape:
        return "('{}', {})".format(dtype.base, dtype.shape)
    else:
        return "'{}'".format(dtype)