code: def _count_next_line_periods(file) -> int:
      """
      Returns the number of . characters before any # on the next
      meaningful line.
      """
      old_offset = file.tell()
      line = file.readline()
      while _is_line_empty(line):
          line = file.readline()
          if len(line) == 0:
              raise ValueError("Premature end of file")
  
      contents = line.split(b"#")[0]
      count = contents.count(b".")
      file.seek(old_offset)
      return count
  
imports: import warnings
  from typing import cast, Optional, Tuple, Union
  import numpy
  import torch
  from iopath.common.file_io import PathManager
  from pytorch3d.io.utils import _check_faces_indices, _open_file, PathOrStr
  from pytorch3d.renderer import TexturesAtlas, TexturesVertex
  from pytorch3d.structures import Meshes
  from .pluggable_formats import endswith, MeshFormatInterpreter
label_desc: Use image node_id 2 for calling a global function with example usage: _count_next_line_periods(file) and returns: count