code: def forward(
      self,
      input: torch.Tensor,
      input_lengths: torch.Tensor = None,
      feats_lengths: torch.Tensor = None,
      durations: torch.Tensor = None,
      durations_lengths: torch.Tensor = None,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      if input_lengths is None:
          input_lengths = (
              input.new_ones(input.shape[0], dtype=torch.long)
              * input.shape[1]
          )
      # Compute the YIN pitch
      # ying = self.yingram(input)
      # ying_lengths = torch.ceil(input_lengths.float() * self.w_step / self.W).long()
  
      # TODO(yifeng): now we pass batch_size = 1,
      # maybe remove batch_size in self.yingram
      # print("input", input.shape)
      ying = [
          self.yingram(x[:xl].unsqueeze(0)).squeeze(0)
          for x, xl in zip(input, input_lengths)
      ]
      # print("yingram", ying[0].shape)
  
      # (Optional): Adjust length to match with the mel-spectrogram
      if feats_lengths is not None:
          ying = [
              self._adjust_num_frames(p, fl).transpose(0, 1)
              for p, fl in zip(ying, feats_lengths)
          ]
  
      # print("yingram2", ying[0].shape)
  
      # Use token-averaged f0
      if self.use_token_averaged_ying:
          durations = durations * self.reduction_factor
          ying = [
              self._average_by_duration(p, d).view(-1)
              for p, d in zip(ying, durations)
          ]
          ying_lengths = durations_lengths
      else:
          ying_lengths = input.new_tensor(
              [len(p) for p in ying], dtype=torch.long
          )
  
      # Padding
      ying = pad_list(ying, 0.0)
  
      # print("yingram3", ying.shape)
  
      return (
          ying.float(),
          ying_lengths,
      )
  
file_path: espnet/espnet2/tts/feats_extract/ying.py
imports: import math
  from typing import Any, Dict, Tuple, Union
  import torch
  from espnet2.tts.feats_extract.abs_feats_extract import AbsFeatsExtract
  from espnet2.tts.feats_extract.yin import *
  from espnet.nets.pytorch_backend.nets_utils import pad_list
label_desc: Use image node_id 9 for calling the Ying obj's underlying member method code with example usage: obj.forward(input, input_lengths, feats_lengths, durations, durations_lengths) and returns: ying,  ying_lengths