def is_regex(pattern):
return type(pattern) is consts.RegexType<EOL>
Check if `pattern` compiled :mod:`re` pattern.

Args:
    * pattern: object to check.

Returns:
    :data:`True` if :data:`pattern` is a compiled :mod:`re` expression, :data:`False` otherwise.