def GetFullyQualifiedScopePrefix(scope):
  """Gets the fully qualified scope prefix.

  Args:
    scope: the Definition for the scope from which the type must be accessed.

  Returns:
    the fully qualified scope prefix string.
  """
  scope_stack = scope.GetParentScopeStack() + [scope]
  return '.'.join([s.name for s in scope_stack[1:]] + [''])