<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _format_type_in_doc(self, namespace, data_type):
 """ Returns a string that can be recognized by Sphinx as a type reference in a docstring. """

        if is_void_type(data_type):
            return 'None'
        elif is_user_defined_type(data_type):
            return ':class:`{}.{}.{}`'.format(
                self.args.types_package, namespace.name, fmt_type(data_type))
        else:
            return fmt_type(data_type)