code: def _get_delay(self, userdelay, frameslist):
          
          # User frameslists might not be a FrameSet.
          delay = userdelay or getattr(frameslist, 'delay', None)
          delay = (delay or self.default_delay) - self.nice_delay
          if delay < 0:
              delay = 0
          return delay
docs: Get the appropriate delay value to use, trying in this order:
                  userdelay
                  frameslist.delay
                  default_delay
  
              The user can override the frameslist's delay by specifiying a
              value, and if neither are given the default is used.