original_docstring: 
      Shocked economic dynamics with external shock vector. To be invoked with ode solver
      Args:
           y: array-like output (I/O matrix formulation)
           t: array-like timesteps
           A: I/O matrix
           external_shock_vec_dict: shock vector annotation dictionary with following annotations
                  key: sector index (should correspond to position in the vector)
                  values:(t0,t1,val) where shock of magnitude val persists between t0 and t1
                 
      Returns:
           Return val of ODE
     
      
docstring: Shocked economic dynamics with external shock vector. To be invoked with ode solver
docstring_tokens: Shocked economic dynamics with external shock vector . To be invoked with ode solver
code: def economic_dynamics_ode(y,t, A, sectors, external_shock_vec_dict):
      '''
      Shocked economic dynamics with external shock vector. To be invoked with ode solver
      Args:
           y: array-like output (I/O matrix formulation)
           t: array-like timesteps
           A: I/O matrix
           external_shock_vec_dict: shock vector annotation dictionary with following annotations
                  key: sector index (should correspond to position in the vector)
                  values:(t0,t1,val) where shock of magnitude val persists between t0 and t1
                 
      Returns:
           Return val of ODE
     
      '''
      try:
          economic_dynamics_ode.time_vec.append(t)
      except:
          economic_dynamics_ode.time_vec = [t]
      shock_vec = pd.Series(data = np.zeros(len(A)), index = sectors)
      for _sector_idx, _shock_attrs in external_shock_vec_dict.items():
          if (t>=_shock_attrs[0]) & (t<=_shock_attrs[1]):
              shock_vec[_sector_idx] = _shock_attrs[2]    
  
      return np.dot(A-np.eye(A.shape[0]),y) + shock_vec
code_tokens: def economic_dynamics_ode ( y , t , A , sectors , external_shock_vec_dict ) : try : economic_dynamics_ode . time_vec . append ( t ) except : economic_dynamics_ode . time_vec = [ t ] shock_vec = pd . Series ( data = np . zeros ( len ( A ) ) , index = sectors ) for _sector_idx , _shock_attrs in external_shock_vec_dict . items ( ) : if ( t >= _shock_attrs [ 0 ] ) & ( t <= _shock_attrs [ 1 ] ) : shock_vec [ _sector_idx ] = _shock_attrs [ 2 ] return np . dot ( A - np . eye ( A . shape [ 0 ] ) , y ) + shock_vec
short_docstring: Shocked economic dynamics with external shock vector.
short_docstring_tokens: Shocked economic dynamics with external shock vector .
comment: '''
      Shocked economic dynamics with external shock vector. To be invoked with ode solver
      Args:
           y: array-like output (I/O matrix formulation)
           t: array-like timesteps
           A: I/O matrix
           external_shock_vec_dict: shock vector annotation dictionary with following annotations
                  key: sector index (should correspond to position in the vector)
                  values:(t0,t1,val) where shock of magnitude val persists between t0 and t1
                 
      Returns:
           Return val of ODE
     
      '''