def AddAgencyObject(self, agency, problem_reporter=None, validate=False):
    assert agency._schedule is None

    if not problem_reporter:
      problem_reporter = self.problem_reporter

    if agency.agency_id in self._agencies:
      problem_reporter.DuplicateID('agency_id', agency.agency_id)
      return

    self.AddTableColumns('agency', agency._ColumnNames())
    agency._schedule = weakref.proxy(self)

    if validate:
      agency.Validate(problem_reporter)
    self._agencies[agency.agency_id] = agency
dataset/ETHPy150Open google/transitfeed/transitfeed/schedule.py/Schedule.AddAgencyObject/original