parameters: (self)
return_statement: return len(self._dims)
docstring: Returns the rank of this shape, or raises ValueError if unspecified.
docstring_summary: Returns the rank of this shape, or raises ValueError if unspecified.
docstring_tokens: Returns the rank of this shape or raises ValueError if unspecified .
function: def __len__(self):
      """Returns the rank of this shape, or raises ValueError if unspecified."""
      if self._dims is None:
        raise ValueError("Cannot take the length of Shape with unknown rank.")
      return len(self._dims)
function_tokens: def __len__ ( self ) : if self . _dims is None : raise ValueError ( "Cannot take the length of Shape with unknown rank." ) return len ( self . _dims )