code: def bed_parser(filename):
      """Parses Range objects from a BED-formatted file object.
  
      See http://bedtools.readthedocs.org/en/latest/content/general-usage.html
      for more information on the BED format.
  
      Args:
        filename: file name of a BED-formatted file.
  
      Yields:
        nucleus.genomics.v1.Range protobuf objects.
      """
      with bed.BedReader(filename) as fin:
          for r in fin.iterate():
              yield make_range(r.reference_name, r.start, r.end)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import re
  from typing import Dict, Iterable, Optional, Sequence
  from absl import logging
  from etils import epath
  import intervaltree
  import six
  from third_party.nucleus.io import bed
  from third_party.nucleus.protos import position_pb2
  from third_party.nucleus.protos import range_pb2
  from third_party.nucleus.protos import reference_pb2
  from third_party.nucleus.protos import variants_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: bed_parser(filename) without return types