human
I wrote the below code

    def _get_child(children):
        '\n                                Returns    either    the    first    or    last    child    based    on    the    value    of\n                                the    requested_child    parameter.        If    requested_child    is    None,\n                                returns    the    first    child.\n                                '
        if (requested_child == 'first'):
            return children[0]
        elif (requested_child == 'last'):
            return children[(-1)]
        else:
            return children[0]
    def _get_default_child_module(child_modules):
        'Returns    the    first    child    of    xmodule,    subject    to    min_depth.'
        if (min_depth <= 0):
            return _get_child(child_modules)
        else:
            content_children = [child for child in child_modules if (child.has_children_at_depth((min_depth - 1)) and child.get_display_items())]
            return (_get_child(content_children) if content_children else None)
    child = None
    if hasattr(xmodule, 'position'):
        children = xmodule.get_display_items()
        if (len(children) > 0):
            if ((xmodule.position is not None) and (not requested_child)):
                pos = (xmodule.position - 1)
                if (0 <= pos < len(children)):
                    child = children[pos]
                    if ((min_depth > 0) and (not child.has_children_at_depth((min_depth - 1)))):
                        child = None
            if (child is None):
                child = _get_default_child_module(children)
    return child

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def get_current_child(xmodule, min_depth=None, requested_child=None):