'Finds the block in the parent with the specified url_name.
If not found, calls get_current_child on the parent.'

def _find_block(self, parent, url_name, block_type, min_depth=None):

    child = None
    if url_name:
        child = parent.get_child_by((lambda m: (m.location.name == url_name)))
        if (not child):
            if (not self._is_masquerading_as_student()):
                raise Http404('No    {block_type}    found    with    name    {url_name}'.format(block_type=block_type, url_name=url_name))
        elif (min_depth and (not child.has_children_at_depth((min_depth - 1)))):
            child = None
    if (not child):
        child = get_current_child(parent, min_depth=min_depth, requested_child=self.request.GET.get('child'))
    return child
