class_docstr: Base class of all clips (VideoClips and AudioClips).
  
  Attributes
  ----------
  
  start : float
    When the clip is included in a composition, time of the
    composition at which the clip starts playing (in seconds).
  
  end : float
    When the clip is included in a composition, time of the
    composition at which the clip stops playing (in seconds).
  
  duration : float
    Duration of the clip (in seconds). Some clips are infinite, in
    this case their duration will be ``None``.
class_docstr_tok: ["Base","class","of","all","clips","(","VideoClips","and","AudioClips",")",".","Attributes","--","--","--","--","--","start",":","float","When","the","clip","is","included","in","a","composition",",","time","of","the","composition","at","which","the","clip","starts","playing","(","in","seconds",")",".","end",":","float","When","the","clip","is","included","in","a","composition",",","time","of","the","composition","at","which","the","clip","stops","playing","(","in","seconds",")",".","duration",":","float","Duration","of","the","clip","(","in","seconds",")",".","Some","clips","are","infinite",",","in","this","case","their","duration","will","be","``","None","``","."]
docstr: Returns a copy of the clip, with the ``end`` attribute set to ``t``,
  which can be expressed in seconds (15.35), in (min, sec), in
  (hour, min, sec), or as a string: '01:03:05.35'. Also sets the duration
  of the mask and audio, if any, of the returned clip.
  
  Parameters
  ----------
  
  t : float or tuple or str
    New ``end`` attribute value for the clip.
docstr_tok: ["Returns","a","copy","of","the","clip",",","with","the","``","end","``","attribute","set","to","``","t","``",",","which","can","be","expressed","in","seconds","(","15.35",")",",","in","(","min",",","sec",")",",","in","(","hour",",","min",",","sec",")",",","or","as","a","string",":","'01:03:05.35","'",".","Also","sets","the","duration","of","the","mask","and","audio",",","if","any",",","of","the","returned","clip",".","Parameters","--","--","--","--","--","t",":","float","or","tuple","or","str","New","``","end","``","attribute","value","for","the","clip","."]
code: def with_end(self, t):
      """Returns a copy of the clip, with the ``end`` attribute set to ``t``,
      which can be expressed in seconds (15.35), in (min, sec), in
      (hour, min, sec), or as a string: '01:03:05.35'. Also sets the duration
      of the mask and audio, if any, of the returned clip.
  
      Parameters
      ----------
  
      t : float or tuple or str
        New ``end`` attribute value for the clip.
      """
      self.end = t
      if self.end is None:
          return
      if self.start is None:
          if self.duration is not None:
              self.start = max(0, t - self.duration)
      else:
          self.duration = self.end - self.start
  
imports: import copy
  from functools import reduce
  from numbers import Real
  from operator import add
  import numpy
  import proglog
  from moviepy.decorators import apply_to_audio, apply_to_mask, convert_parameter_to_seconds, outplace, requires_duration, use_clip_fps_by_default
label_desc: Use image node_id 8 for calling the Clip obj's underlying member method code with example usage: obj.with_end(t) without return types