code: def _format_url(
      instrument_type,
      instrument_ids,
      start_date,
      end_date,
      earliest_allowed_date,
  ):
      """
      Format a URL for loading data from Bank of Canada.
      """
      return (
          "http://www.bankofcanada.ca/stats/results/csv"
          "?lP=lookup_{instrument_type}_yields.php"
          "&sR={restrict}"
          "&se={instrument_ids}"
          "&dF={start}"
          "&dT={end}".format(
              instrument_type=instrument_type,
              instrument_ids="-".join(
                  map(prepend("L_"), instrument_ids)
              ),
              restrict=earliest_allowed_date.strftime("%Y-%m-%d"),
              start=start_date.strftime("%Y-%m-%d"),
              end=end_date.strftime("%Y-%m-%d"),
          )
      )
  
file_path: catalyst/catalyst/data/treasuries_can.py
imports: import pandas
  import six
  from toolz import curry
  from toolz.curried.operator import add
label_desc: Use image node_id 1 for calling a global function with example usage: _format_url(instrument_type, instrument_ids, start_date, end_date, earliest_allowed_date) and returns: str