original_docstring: 
          Replace the child behaviour with another.
  
          Args:
              child (:class:`~py_trees.behaviour.Behaviour`): child to delete
              replacement (:class:`~py_trees.behaviour.Behaviour`): child to insert
          
docstring: Replace the child behaviour with another.
docstring_tokens: Replace the child behaviour with another .
code: def replace_child(self, child, replacement):
          """
          Replace the child behaviour with another.
  
          Args:
              child (:class:`~py_trees.behaviour.Behaviour`): child to delete
              replacement (:class:`~py_trees.behaviour.Behaviour`): child to insert
          """
          if child.status == Status.RUNNING:
              child.stop(Status.INVALID)
          child_index = self.children.index(child)
          self.logger.debug("%s.replace_child()[%s->%s]" % (self.__class__.__name__, child.name, replacement.name))
          self.children[child_index] = replacement
code_tokens: def replace_child ( self , child , replacement ) : if child . status == Status . RUNNING : child . stop ( Status . INVALID ) child_index = self . children . index ( child ) self . logger . debug ( "%s.replace_child()[%s->%s]" % ( self . __class__ . __name__ , child . name , replacement . name ) ) self . children [ child_index ] = replacement
short_docstring: Replace the child behaviour with another.
short_docstring_tokens: Replace the child behaviour with another .
comment: """
          Replace the child behaviour with another.
  
          Args:
              child (:class:`~py_trees.behaviour.Behaviour`): child to delete
              replacement (:class:`~py_trees.behaviour.Behaviour`): child to insert
          """