<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def intersects_first(self, ray_origins, ray_directions):
 """ Find the index of the first triangle a ray hits. Parameters ray_origins: (n,3) float, origins of rays ray_directions: (n,3) float, direction (vector) of rays Returns triangle_index: (n,) int, index of triangle ray hit, or -1 if not hit """


        ray_origins = np.asanyarray(deepcopy(ray_origins))
        ray_directions = np.asanyarray(ray_directions)

        triangle_index = self._scene.run(ray_origins,
                                         ray_directions)
        return triangle_index