code: def bandstructure_flow(workdir, scf_input, nscf_input, dos_inputs=None, manager=None, flow_class=Flow, allocate=True):
      
      flow = flow_class(workdir, manager=manager)
      work = BandStructureWork(scf_input, nscf_input, dos_inputs=dos_inputs)
      flow.register_work(work)
  
      # Handy aliases
      flow.scf_task, flow.nscf_task, flow.dos_tasks = work.scf_task, work.nscf_task, work.dos_tasks
  
      if allocate: flow.allocate()
      return flow
docs: Build a :class:`Flow` for band structure calculations.
  
      Args:
          workdir: Working directory.
          scf_input: Input for the GS SCF run.
          nscf_input: Input for the NSCF run (band structure run).
          dos_inputs: Input(s) for the NSCF run (dos run).
          manager: :class:`TaskManager` object used to submit the jobs
                   Initialized from manager.yml if manager is None.
          flow_class: Flow subclass
          allocate: True if the flow should be allocated before returning.
  
      Returns:
          :class:`Flow` object