<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_data_type(self, data_type):
 """Helper function to format a data type. This returns the name if it's a struct or union, otherwise (i.e. for primitive types) it renders the name and the parameters. """

        s = data_type.name
        for type_class, key_list in self._data_type_map:
            if isinstance(data_type, type_class):
                args = []
                for key in key_list:
                    val = getattr(data_type, key)
                    if val is not None:
                        if isinstance(val, AstTypeRef):
                            sval = val.name
                        elif isinstance(val, DataType):
                            sval = self.format_data_type(val)
                        else:
                            sval = self.format_value(val)
                        args.append(key + '=' + sval)
                if args:
                    s += '(' + ', '.join(args) + ')'
                break
        if data_type.nullable:
            s += '?'
        return s