parameters: (fqn)
return_statement: return last_found
docstring: Find the position where the namespace in `fqn` ends.
  
      Args:
          fqn (string): fully-qualified class name.
  
      Returns:
          integer: position where the namespace in `fqn` ends, i.e. the position
              of the last '::', or -1 if there is no '::' in `fqn`.
docstring_summary: Find the position where the namespace in `fqn` ends.
docstring_tokens: Find the position where the namespace in fqn ends .
function: def _find_namespace_end(fqn):
      '''
      Find the position where the namespace in `fqn` ends.
  
      Args:
          fqn (string): fully-qualified class name.
  
      Returns:
          integer: position where the namespace in `fqn` ends, i.e. the position
              of the last '::', or -1 if there is no '::' in `fqn`.
      '''
  
      last_found = -1
      prev_c = ''
      pos = 0
      for c in fqn:
          if c == ':' and prev_c == ':':
              last_found = pos - 1
          elif c == '<':
              # If we found a template, this is already the class name,
              # so we're done!
              break
          prev_c = c
          pos += 1
  
      return last_found
function_tokens: def _find_namespace_end ( fqn ) : last_found = - 1 prev_c = '' pos = 0 for c in fqn : if c == ':' and prev_c == ':' : last_found = pos - 1 elif c == '<' : # If we found a template, this is already the class name, # so we're done! break prev_c = c pos += 1 return last_found