<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _prepare_routes(self, routes):
 """Prepare the routes by iterating through the list of tuples & calling prepare route on them. :param routes: Routes to prepare :type routes: list :rtype: list :raises: ValueError """

        if not isinstance(routes, list):
            raise ValueError('Routes parameter must be a list of tuples')
        prepared_routes = list()
        for parts in routes:
            route = self._prepare_route(parts)
            if route:
                LOGGER.info('Appending handler: %r', route)
                prepared_routes.append(route)
        return prepared_routes