title: How do I override a function of a python library?
body: <p>I am using a python library where I need to override one of the functions. Let's call this <code>module.py</code>:</p>
  
  <pre><code>def dump(nodes, args = 'bleh' ):
    ...validation checks
    for node in nodes:
      print(node, someother_args)
  
  def print_node(node, someother_args):
    ...prints in some way i don't want
  </code></pre>
  
  <p>Now, I am using this <code>dump</code> method and I want to override the <code>print_node</code> function with my own <code>print_node</code> method because I want to print it in different way. What is the best way to do that?</p>