code: def next_fast_len(size):
      """
      Returns the next largest number ``n >= size`` whose prime factors are all
      2, 3, or 5. These sizes are efficient for fast fourier transforms.
      Equivalent to :func:`scipy.fftpack.next_fast_len`.
  
      :param int size: A positive number.
      :returns: A possibly larger number.
      :rtype int:
      """
      try:
          return _NEXT_FAST_LEN[size]
      except KeyError:
          pass
  
      assert isinstance(size, int) and size > 0
      next_size = size
      while True:
          remaining = next_size
          for n in (2, 3, 5):
              while remaining % n == 0:
                  remaining //= n
          if remaining == 1:
              _NEXT_FAST_LEN[size] = next_size
              return next_size
          next_size += 1
  
imports: import math
  import torch
  from torch.fft import irfft, rfft
  from ..None import settings
label_desc: Use image node_id 8 for calling a global function with example usage: next_fast_len(size) and returns: _NEXT_FAST_LEN, next_size