code: def get_curve(self, arg):
          
          k = self._key
          if self._params['kty'] not in ['EC', 'OKP']:
              raise InvalidJWKType('Not an EC or OKP key')
          if arg and k['crv'] != arg:
              raise InvalidJWKValue('Curve requested is "%s", but '
                                    'key curve is "%s"' % (arg, k['crv']))
  
          return self._get_curve_by_name(k['crv'])
docs: Gets the Elliptic Curve associated with the key.
  
          :param arg: an optional curve name
  
          :raises InvalidJWKType: the key is not an EC or OKP key.
          :raises InvalidJWKValue: if the curve names is invalid.