<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Getting Started with OpenTire w/ Jupyter Notebook
Generate a lateral force vs slip angle plot
Import OpenTire and other libraries used in this demonstration
Step1:  Initialize the OpenTire factory and create a Pacejka 2002 tire model
Step2:  Initialize the tire state
Step3:  Solving for the tire forces will update the tire state
Step4:  Iterate over vertical loads and slip angles to generate a lateral force vs slip angle plot at three different vertical loads.
<ASSISTANT_TASK:>
Python Code:
from opentire import OpenTire
from opentire.Core import TireState
from opentire.Core import TIRFile
from pprint import pprint
import numpy as np
import matplotlib.pyplot as plt
Explanation: Getting Started with OpenTire w/ Jupyter Notebook
Generate a lateral force vs slip angle plot
Import OpenTire and other libraries used in this demonstration
End of explanation
openTire = OpenTire()
myTireModel = openTire.createmodel('PAC2002')
Explanation: Initialize the OpenTire factory and create a Pacejka 2002 tire model
End of explanation
state = TireState()
state['FZ'] = 1500
state['IA'] = 0.0
state['SR'] = 0.0
state['SA'] = 0.0
state['FY'] = 0.0
state['V'] = 10.0
state['P'] = 260000
Explanation: Initialize the tire state
End of explanation
myTireModel.solve(state)
pprint(state)
Explanation: Solving for the tire forces will update the tire state
End of explanation
# Setup the simulation range
vertical_loads = [500, 1000, 2000]
slip_angles = np.arange(-12, 12, 0.1) * 3.14 / 180
# Initialize the lateral force result
lateral_force = []
for fz in vertical_loads:
    lateral_force = []
    state['FZ'] = fz
    
    for sa in slip_angles:
        # Solving
        state['SA'] = sa
        myTireModel.solve(state)
        lateral_force.append(state['FY'])
    # Plot the series
    plt.plot(slip_angles * 180 / 3.14, lateral_force, label=fz)
# Plotting
plt.grid()
plt.xlabel('Slip Angle [deg]')
plt.ylabel('Lateral Force [N]')
plt.title('Lateral Force vs. Slip Angle')
plt.show()
Explanation: Iterate over vertical loads and slip angles to generate a lateral force vs slip angle plot at three different vertical loads.
End of explanation
<END_TASK>