docstr: Sets the legend rank for new shape. Items and groups with
  smaller ranks are presented on top/left side while with
  "reversed" `legend.traceorder` they are on bottom/right side.
  The default legendrank is 1000, so that you can use ranks less
  than 1000 to place certain items before all unranked items, and
  ranks greater than 1000 to go after all unranked items.
  
  The 'legendrank' property is a number and may be specified as:
    - An int or float
  
  Returns
  -------
  int|float
docstr_tok: ["Sets","the","legend","rank","for","new","shape",".","Items","and","groups","with","smaller","ranks","are","presented","on","top\/left","side","while","with","''","reversed","''","`","legend.traceorder","`","they","are","on","bottom\/right","side",".","The","default","legendrank","is","1000",",","so","that","you","can","use","ranks","less","than","1000","to","place","certain","items","before","all","unranked","items",",","and","ranks","greater","than","1000","to","go","after","all","unranked","items",".","The","'legendrank","'","property","is","a","number","and","may","be","specified","as",":","-","An","int","or","float","Returns","--","--","--","-","int|float"]
code: def legendrank(self):
      """
      Sets the legend rank for new shape. Items and groups with
      smaller ranks are presented on top/left side while with
      "reversed" `legend.traceorder` they are on bottom/right side.
      The default legendrank is 1000, so that you can use ranks less
      than 1000 to place certain items before all unranked items, and
      ranks greater than 1000 to go after all unranked items.
  
      The 'legendrank' property is a number and may be specified as:
        - An int or float
  
      Returns
      -------
      int|float
      """
      return self["legendrank"]
  
imports: from plotly.basedatatypes import BaseLayoutHierarchyType
  import copy
label_desc: Use image node_id 17 for calling the Newshape obj's underlying member method code with example usage: obj.legendrank() and returns: self