<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def index_by_id(cls, target_id, resources):
 """Helper method to fetch the index of a resource by its id or address Args: resources (list of objects):
 The resources to be paginated target_id (string):
 The address or header_signature of the resource Returns: integer: The index of the target resource Raises: AssertionError: Raised if the target is not found """

        for index in range(len(resources)):
            if cls.id_by_index(index, resources) == target_id:
                return index

        raise AssertionError