code: def update_pypsa_bus_timeseries(network, timesteps=None):
      
      if timesteps is None:
          timesteps = network.pypsa.buses_t.v_mag_pu_set.index
      # check if timesteps is array-like, otherwise convert to list
      if not hasattr(timesteps, "__len__"):
          timesteps = [timesteps]
      buses = network.pypsa.buses.index
      v_mag_pu_set = _pypsa_bus_timeseries(network, buses, timesteps)
      network.pypsa.buses_t.v_mag_pu_set = v_mag_pu_set
docs: Updates buses voltage time series in pypsa representation.
  
      This function overwrites v_mag_pu_set of buses_t attribute of
      pypsa network.
      Be aware that if you call this function with `timesteps` and thus overwrite
      current time steps it may lead to inconsistencies in the pypsa network
      since only bus time series are updated but none of the other time
      series or the snapshots attribute of the pypsa network. Use the function
      :func:`update_pypsa_timeseries` to change the time steps you want to
      analyse in the power flow analysis.
  
      Parameters
      ----------
      network : Network
          The eDisGo grid topology model overall container
      timesteps : :pandas:`pandas.DatetimeIndex<datetimeindex>` or :pandas:`pandas.Timestamp<timestamp>`
          Timesteps specifies which time steps of the time series to
          export to pypsa representation. If None all time steps currently
          existing in pypsa representation are updated. If not None current
          time steps are overwritten by given time steps. Default: None.