def find(self, dtype):
if not isinstance(dtype, str):<EOL><INDENT>dtype_type = dtype<EOL>if not isinstance(dtype, type):<EOL><INDENT>dtype_type = type(dtype)<EOL><DEDENT>if issubclass(dtype_type, ExtensionDtype):<EOL><INDENT>return dtype<EOL><DEDENT>return None<EOL><DEDENT>for dtype_type in self.dtypes:<EOL><INDENT>try:<EOL><INDENT>return dtype_type.construct_from_string(dtype)<EOL><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return None<EOL>
Parameters
----------
dtype : PandasExtensionDtype or string

Returns
-------
return the first matching dtype, otherwise return None