code: def temporal_from_rdf(period_of_time):
      '''Failsafe parsing of a temporal coverage'''
      try:
          if isinstance(period_of_time, Literal):
              return temporal_from_literal(str(period_of_time))
          elif isinstance(period_of_time, RdfResource):
              return temporal_from_resource(period_of_time)
      except Exception:
          # There are a lot of cases where parsing could/should fail
          # but we never want to break the whole dataset parsing
          # so we log the error for future investigation and improvement
          log.warning('Unable to parse temporal coverage', exc_info=Truef temporal_from_rdf(period_of_time):
      '''Failsafe parsing of a temporal coverage'''
      try:
          if isinstance(period_of_time, Literal):
              return temporal_from_literal(str(period_of_time))
          elif isinstance(period_of_time, RdfResource):
              return temporal_from_resource(period_of_time)
      except Exception:
          # There are a lot of cases where parsing could/should fail
          # but we never want to break the whole dataset parsing
          # so we log the error for future investigation and improvement
          log.warning('Unable to parse temporal coverage', exc_info=True)
docs: Failsafe parsing of a temporal coverage