class_docstr: Call a function periodically with the specified number of seconds
class_docstr_tok: ["Call","a","function","periodically","with","the","specified","number","of","seconds"]
code: def run(self) -> None:
      now = time.time()
      next_call = now + self._interval
      while (next_call <= now and not self._finished.is_set()) or (
          next_call > now and not self._finished.wait(next_call - now)
      ):
          if next_call <= now:
              next_call = now + self._interval
          else:
              next_call = next_call + self._interval
          self._function(*self._args, **self._kwargs)
          now = time.time()
  
imports: import datetime
  import threading
  import time
  from collections.abc import Generator
  from functools import partial
  from typing import Any, Tuple, Dict, List
  from pyflink.common import Row
  from pyflink.fn_execution import pickle
  from pyflink.serializers import PickleSerializer
  from pyflink.table import functions
  from pyflink.table.udf import DelegationTableFunction, DelegatingScalarFunction, ImperativeAggregateFunction, PandasAggregateFunctionWrapper
label_desc: Use image node_id 2 for calling the PeriodicThread obj's underlying member method code with example usage: obj.run() without return types