You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: specialize.go
    path of file: ./repos/td/telegram/query/channels/participants
    
    the code of the file until where you have to start completion: package participants

import (
	"github.com/gotd/td/telegram/query/photos"
	"github.com/gotd/td/tg"
)

// UserPhotos returns new user photo query builder for participant.
func (e Elem) UserPhotos(raw *tg.Client) (*photos.GetUserPhotosQueryBuilder, bool) {
	user, ok := e.User()
	if !ok {
		return nil, false
	}
	return photos.N
    
func (e Elem) User() (*tg.User, bool) {
	switch part := e.Participant.(type) {
	case interface{ GetUserID() int64 }:
		return e.Entities.User(part.GetUserID())
	case interface{ GetPeer() tg.PeerClass }:
		user, ok := part.GetPeer().(*tg.PeerUser)
		if !ok {
			return nil, false
		}

		return e.Entities.User(user.GetUserID())
	default:
		return nil, false
	}
}