Returns the timex object for the supplied identifier
        @type timex_id: string
        @param timex_id: timex identifier
428302
def get_timex(self, timex_id):
        
        if timex_id in self.idx:
            return Ctime(self.idx[timex_id])
        else:
            return None
789067
def start_time_from_tindex(tindex)
      if index_references_time(tindex)
        return @constructs[tindex].time
      elsif index_references_timespan(tindex)
        return @constructs[tindex].start_time
      else
        fail 'ConstructInterpreter#start_time_from_tindex says: tindex does not reference a time or time span'
      end
    end
21245
def remove_timex3s(self, list_timex_ids):
        
        nodes_to_remove = set()
        for timex in self:
            if timex.get_id() in list_timex_ids:
                nodes_to_remove.add(timex.get_node())
                #for removing the previous comment (expected the layer will look like termlayer)
                prv = timex.get_node().getprevious()
                if prv is not None:
                    nodes_to_remove.add(prv)

        for node in nodes_to_remove:
            self.node.remove(node)
1094932
public T getFromZeroBasedIdx(final int idx) {
        if (this.timeSeries != null && this.currentNowIdx != -1) {

            // we can use the default validation, because the index still must be in the borders of the time-series
            validateIdx(idx);
            return get(idx(currentNowIdx + idx));
        } else {
            return null;
        }
    }
344165
def get_type(self, idx):
        
        _type = self.get_type_ref(idx)
        if _type == -1:
            return "AG:ITI: invalid type"
        return self.get_string(_type)
9329
def detx(self, det_id, t0set=None, calibration=None):
        
        url = 'detx/{0}?'.format(det_id)    # '?' since it's ignored if no args
        if t0set is not None:
            url += '&t0set=' + t0set
        if calibration is not None:
            url += '&calibrid=' + calibration

        detx = self._get_content(url)
        return detx
207596
def __get_timemachine(self):
        """"""
        if not self.__timemachine:
            self.__timemachine = TimeMachine(
                self.object_uid,
                step = self.id,
            )

        return self.__timemachine.at(self.id)
246204
def t_ID(self, token):
        '
        if token.value in self.KEYWORDS:
            token.type = self.KEYWORDS[token.value]
            return token
        else:
            return token
395661
def getTzid(tzid, smart=True):
    """"""
    tz = __tzidMap.get(toUnicode(tzid), None)
    if smart and tzid and not tz:
        try:
            from pytz import timezone, UnknownTimeZoneError
            try:
                tz = timezone(tzid)
                registerTzid(toUnicode(tzid), tz)
            except UnknownTimeZoneError:
                pass
        except ImportError:
            pass
    return tz
520883
def id(self):
        
        if not hasattr(self, '_id'):
            self._id = str(threading.current_thread().ident + id(self))[-6:]
        return self._id
1076395
def tag_timexes(self):
        """"""
        if not self.is_tagged(ANALYSIS):
            self.tag_analysis()
        if not self.is_tagged(TIMEXES):
            if self.__timex_tagger is None:
                self.__timex_tagger = load_default_timex_tagger()
            self.__timex_tagger.tag_document(self, **self.__kwargs)
        return self
1275034
public static ZoneId getTimeZoneId(final TimeZone tz) {
        return ZoneId.of(tz.getID(), ZoneId.SHORT_IDS);
    }
890952
def _get_time_override(self):
        

        if callable(self.time_override):
            time_override = self.time_override()
        else:
            time_override = self.time_override

        if not isinstance(time_override, datetime_time):
            raise ValueError(
                'Invalid type. Must be a datetime.time instance.'
            )

        return time_override
158957
def timecode(time_now, interval):
    
    i = time.mktime(time_now.timetuple())
    return int(i / interval)
1147820
def get_mark(self, mark_id):
        
        if mark_id in self.idx:
            return Cmarkable(self.idx[mark_id], self.type)
        else:
            return None
599343
def get_id(date: datetime.datetime) -> str:
        
        date = date.strftime('%Y%m%d')
        return 'PB-{}-{}-{:03d}'.format(date, 'sip', randint(0, 100))
950736
def timesince(self, now=None):
        
        from django.utils.timesince import timesince as timesince_
        return timesince_(self.timestamp, now)