code: def ellipse2pathd(ellipse):
      
  
      cx = ellipse.get('cx', 0)
      cy = ellipse.get('cy', 0)
      rx = ellipse.get('rx', None)
      ry = ellipse.get('ry', None)
      r = ellipse.get('r', None)
  
      if r is not None:
          rx = ry = float(r)
      else:
          rx = float(rx)
          ry = float(ry)
  
      cx = float(cx)
      cy = float(cy)
  
      d = ''
      d += 'M' + str(cx - rx) + ',' + str(cy)
      d += 'a' + str(rx) + ',' + str(ry) + ' 0 1,0 ' + str(2 * rx) + ',0'
      d += 'a' + str(rx) + ',' + str(ry) + ' 0 1,0 ' + str(-2 * rx) + ',0'
  
      return d
docs: converts the parameters from an ellipse or a circle to a string for a 
      Path object d-attribute