@staticmethod<EOL><INDENT>def is_valid_dtype_n_method(dtype):<DEDENT>
return ((is_numeric_dtype(dtype) and not is_complex_dtype(dtype)) or<EOL>needs_i8_conversion(dtype))<EOL>
Helper function to determine if dtype is valid for
nsmallest/nlargest methods