docs: def get_contract(firma, pravni_forma, sidlo, ic, dic, zastoupen):
      """
      Compose contract and create PDF.
  
      Args:
          firma (str): firma
          pravni_forma (str): pravni_forma
          sidlo (str): sidlo
          ic (str): ic
          dic (str): dic
          zastoupen (str): zastoupen
  
      Returns:
          obj: StringIO file instance containing PDF file.
      """
      contract_fn = _resource_context(
          "Licencni_smlouva_o_dodavani_elektronickych_publikaci"
          "_a_jejich_uziti.rst"
      )
  
      # load contract
      with open(contract_fn) as f:
          contract = f.read()#.decode("utf-8").encode("utf-8")
  
      # make sure that `firma` has its heading mark
      firma = firma.strip()
      firma = firma + "\n" + ((len(firma) + 1) * "-")
  
      # patch template
      contract = Template(contract).substitute(
          firma=firma,
          pravni_forma=pravni_forma.strip(),
          sidlo=sidlo.strip(),
          ic=ic.strip(),
          dic=dic.strip(),
          zastoupen=zastoupen.strip(),
          resources_path=RES_PATH
      )
  
      return gen_pdf(
          contract,
          open(_resource_context("style.json")).read(),
      )