parameters: (name)
return_statement: return name[:name.rfind(SEP)+1] or SEP
docstring: Get the namespace of name. The namespace is returned with a
      trailing slash in order to favor easy concatenation and easier use
      within the global context.
          
      @param name: name to return the namespace of. Must be a legal
          name. NOTE: an empty name will return the global namespace.
      @type  name: str
      @return str: Namespace of name. For example, '/wg/node1' returns '/wg/'. The
          global namespace is '/'. 
      @rtype: str
      @raise ValueError: if name is invalid
docstring_summary: Get the namespace of name. The namespace is returned with a
      trailing slash in order to favor easy concatenation and easier use
      within the global context.
docstring_tokens: Get the namespace of name . The namespace is returned with a trailing slash in order to favor easy concatenation and easier use within the global context .
function: def namespace(name):
      """
      Get the namespace of name. The namespace is returned with a
      trailing slash in order to favor easy concatenation and easier use
      within the global context.
          
      @param name: name to return the namespace of. Must be a legal
          name. NOTE: an empty name will return the global namespace.
      @type  name: str
      @return str: Namespace of name. For example, '/wg/node1' returns '/wg/'. The
          global namespace is '/'. 
      @rtype: str
      @raise ValueError: if name is invalid
      """    
      "map name to its namespace"
      if name is None: 
          raise ValueError('name')
      if not isstring(name):
          raise TypeError('name')
      if not name:
          return SEP
      elif name[-1] == SEP:
          name = name[:-1]
      return name[:name.rfind(SEP)+1] or SEP
function_tokens: def namespace ( name ) : "map name to its namespace" if name is None : raise ValueError ( 'name' ) if not isstring ( name ) : raise TypeError ( 'name' ) if not name : return SEP elif name [ - 1 ] == SEP : name = name [ : - 1 ] return name [ : name . rfind ( SEP ) + 1 ] or SEP