parameters: (nbits, getprime_func, accurate=True)
return_statement: return (p, q, e, d)
docstring: Generate RSA keys of nbits bits. Returns (p, q, e, d).
  
      Note: this can take a long time, depending on the key size.
      
      :param nbits: the total number of bits in ``p`` and ``q``. Both ``p`` and
          ``q`` will use ``nbits/2`` bits.
      :param getprime_func: either :py:func:`rsa.prime.getprime` or a function
          with similar signature.
docstring_summary: Generate RSA keys of nbits bits. Returns (p, q, e, d).
docstring_tokens: Generate RSA keys of nbits bits . Returns ( p q e d ) .
function: def gen_keys(nbits, getprime_func, accurate=True):
      '''Generate RSA keys of nbits bits. Returns (p, q, e, d).
  
      Note: this can take a long time, depending on the key size.
      
      :param nbits: the total number of bits in ``p`` and ``q``. Both ``p`` and
          ``q`` will use ``nbits/2`` bits.
      :param getprime_func: either :py:func:`rsa.prime.getprime` or a function
          with similar signature.
      '''
  
      (p, q) = find_p_q(nbits // 2, getprime_func, accurate)
      (e, d) = calculate_keys(p, q, nbits // 2)
  
      return (p, q, e, d)
function_tokens: def gen_keys ( nbits , getprime_func , accurate = True ) : ( p , q ) = find_p_q ( nbits // 2 , getprime_func , accurate ) ( e , d ) = calculate_keys ( p , q , nbits // 2 ) return ( p , q , e , d )