code: def _get_speed(element_duration, wpm, word_ref=WORD):
      
      seconds_per_dot = _seconds_per_dot(word_ref)
      if element_duration is None and wpm is None:
          # element_duration = 1
          # wpm = seconds_per_dot / element_duration
          wpm = WPM
          element_duration = wpm_to_duration(wpm, output='float', word_ref=WORD) / 1000.0
          return element_duration, wpm
      elif element_duration is not None and wpm is None:
          wpm = seconds_per_dot / element_duration
          return element_duration, wpm
      elif element_duration is None and wpm is not None:
          element_duration = wpm_to_duration(wpm, output='float', word_ref=WORD) / 1000.0
          return element_duration, wpm
      else:
          raise NotImplementedError("Can't set both element_duration and wpm")
docs: Returns
          element duration when element_duration and/or code speed is given
          wpm
  
      >>> _get_speed(0.2, None)
      (0.2, 5.999999999999999)
  
      >>> _get_speed(None, 15)
      (0.08, 15)
  
      >>> _get_speed(None, None)
      (0.08, 15)