A parent in a dependency case is entitled to raise a claim of ineffective assistance of counsel in connection with a parental rights termination order by habeas corpus petition filed concurrently with an appeal from the termination order. A petition for writ of habeas corpus in a dependency matter raising ineffective assistance of counsel does not lie from a final order, but an order is only final when the time for appeal has expired and no timely appeal has been filed, or the order has been appealed and affirmed. It is appropriate to raise the issue by petition for writ of habeas corpus filed concurrently with an appeal from a final order, if the claim of ineffective assistance of counsel relates to the order appealed from. Therefore, where mother contended her counsel was ineffective for failing to object to defective notice, request a continuance, and communicate with her prior to a section 366.26 hearing, she was entitled to seek habeas corpus relief based on ineffective assistance occurring in connection with the 366.26 hearing. The claim did not relate to antecedent final orders, but only to the termination order.