def find_predecessor_row_from_batch(parsed_rows, batch_row_id, predecessor_name):
    """
    finds a relevant predecessor row in a batch
    """
    batch_rows = filter(
        lambda x: x['parent_id'] == batch_row_id,
        parsed_rows
    )
    for row in batch_rows:
        if row['name'] == predecessor_name:
            return row

    return None