t1 = ((1, 3), (5, (4, 6)))

t2 = (
   (
      1,
      3
   ),
   (
      5,
      (
         4,
         6
      )
   )
)


def dumps(t, *, indentation=0, indent=4):
    prefix = ' ' * indentation * indent
    if isinstance(t, tuple):
        s = ''
        s += prefix + '(\n'
        children = []
        for child in t:
            children.append(dumps(child,
                                  indentation=indentation + 1,
                                  indent=indent))
        s += (',\n').join(children)
        #s += 'tuple\n'
        s += '\n' + prefix + ')'
        return s
    else:
        return prefix + str(t)

print(dumps(t1))

