def METHOD_NAME(self, builder):
    if self.fooTable is not None:
        fooTable = self.fooTable.METHOD_NAME(builder)
    if self.fooUnion is not None:
        fooUnion = self.fooUnion.METHOD_NAME(builder)
    TableInFirstNSStart(builder)
    if self.fooTable is not None:
        TableInFirstNSAddFooTable(builder, fooTable)
    TableInFirstNSAddFooEnum(builder, self.fooEnum)
    TableInFirstNSAddFooUnionType(builder, self.fooUnionType)
    if self.fooUnion is not None:
        TableInFirstNSAddFooUnion(builder, fooUnion)
    if self.fooStruct is not None:
        fooStruct = self.fooStruct.METHOD_NAME(builder)
        TableInFirstNSAddFooStruct(builder, fooStruct)
    tableInFirstNS = TableInFirstNSEnd(builder)
    return tableInFirstNS