code: def get_name_on_date(self, date):
          
          if date is None:
              return self.name
  
          post_name_changes = CompanyNameChange.objects.filter(company=self,
                                                               date__gte=date).order_by('date')
          if post_name_changes.count() == 0:
              return self.name
          else:
              return post_name_changes[0].name_before
docs: Get the name of a company on a given date. This takes into accounts and
          name changes that may have occurred.