code: def create_sequence_mask(self, tokens: torch.Tensor) -> torch.Tensor:
      mask = torch.where(
          tokens == self.tokenizer.pad_id,
          torch.zeros_like(tokens),
          torch.ones_like(tokens),
      )
      mask = torch.where(
          tokens == self.tokenizer.bos_id,
          torch.zeros_like(tokens),
          mask,
      )
      mask = torch.where(
          tokens == self.tokenizer.eos_id,
          torch.zeros_like(tokens),
          mask,
      )
      return mask
  
imports: import json
  import math
  import os
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Tuple, List, Union, Optional
  import deepspeed
  import torch
  import torch.distributed
  import torch.nn.functional
  import fairscale.nn.model_parallel.initialize
  from fairscale.nn.model_parallel.initialize import initialize_model_parallel
  from fairscale.nn.model_parallel.layers import ParallelEmbedding, RowParallelLinear, ColumnParallelLinear
  from torch import nn
  from transformers import AutoTokenizer
  from llama import Tokenizer
  from llama.generation import sample_top_p
label_desc: Use image node_id 2 for calling the HFLikeTokenizer obj's underlying member method code with example usage: obj.create_sequence_mask(tokens) and returns: mask