def METHOD_NAME(self, authority=None, user=None, document_uri=None):
    """
    Return a list of groups relevant to this request context.
    Return a list of groups filtered on user, authority, document_uri.
    Groups are returned in this order:
    - OPEN AND RESTRICTED GROUPS:
      Only those open or restricted group that match scope of document_uri
      will be returned (if document_uri is missing, no open or restricted
      groups will be returned)
    - WORLD GROUP:
      The special world group is returned if `authority` is the default
      authority
    - PRIVATE GROUPS:
      All private groups for the user will be returned
      This should return a list of groups appropriate to the client
      via the API.
    """
    authority = self._authority(user, authority)
    scoped_groups = []
    private_groups = []
    if document_uri:
        scoped_groups = self.scoped_groups(authority, document_uri)
    world_group = self.world_group(authority)
    world_group = [world_group] if world_group else []
    if user:
        private_groups = self.private_groups(user)
    return scoped_groups + world_group + private_groups