code: def _extract_time_loc(self, term):
          
          loc = term.find('location')
          if loc is None:
              loc_context = None
          else:
              loc_id = loc.attrib.get('id')
              loc_term = self.tree.find("*[@id='%s']" % loc_id)
              text = loc_term.findtext('text')
              name = loc_term.findtext('name')
              loc_context = RefContext(name=text)
          time = term.find('time')
          if time is None:
              time_context = None
          else:
              time_id = time.attrib.get('id')
              time_term = self.tree.find("*[@id='%s']" % time_id)
              if time_term is not None:
                  text = time_term.findtext('text')
                  timex = time_term.find('timex')
                  if timex is not None:
                      year = timex.findtext('year')
                      try:
                          year = int(year)
                      except Exception:
                          year = None
                      month = timex.findtext('month')
                      day = timex.findtext('day')
                      if year and (month or day):
                          try:
                              month = int(month)
                          except Exception:
                              month = 1
                          try:
                              day = int(day)
                          except Exception:
                              day = 1
                          start = datetime(year, month, day)
                          time_context = TimeContext(text=text, start=start)
                      else:
                          time_context = TimeContext(text=text)
                  else:
                      time_context = TimeContext(text=text)
              else:
                  time_context = None
          return time_context, loc_context
docs: Get the location from a term (CC or TERM)