Can somebody tell me how to make ownerOf function for ERC1155 token?

How to get ownerOf a specific token in the ERC1155 token?

lets say i have minted single erc721 as well as batch nfts in the erc1155 token contract. How can i get owner of a specific for specific token id?

Like we do have ownerOf function in ERC721 contract. How can i make one for that?

Waiting for your kind answers.

mapping (uint256 => mapping(uint256 =>address)) private _owners;

function ownerOf(uint256 id, uint256 tokenId) public view virtual returns (address) {
    address owner = _owners[id][tokenId];
    require(owner != address(0), "owner query for nonexistent token");
    return owner;

where is it or do you place this mapping?

what is the first id?

I understand that the idToken is the ID of the different NFTs, right? With which you can know the balance you have with the address of the owner

   function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];