code: def as_timedelta(cls, delta):
          
          # Cannot monkey patch the __class__ and must pass through __new__ as the object is immutable.
          if isinstance(delta, cls): return delta
          return cls(delta.days, delta.seconds, delta.microseconds)
docs: Convert delta into a MyTimedelta object.