code: def get_bag_info(bag_file):
      '''Get uamle dict of the bag information
      by calling the subprocess -- used to create correct sized
      arrays'''
      # Get the info on the bag
      bag_info = yaml.load(subprocess.Popen(
          ['rosbag', 'info', '--yaml', bag_file],
          stdout=subprocess.PIPE).communicate()[0])
      return bag_inff get_bag_info(bag_file):
      '''Get uamle dict of the bag information
      by calling the subprocess -- used to create correct sized
      arrays'''
      # Get the info on the bag
      bag_info = yaml.load(subprocess.Popen(
          ['rosbag', 'info', '--yaml', bag_file],
          stdout=subprocess.PIPE).communicate()[0])
      return bag_info
docs: Get uamle dict of the bag information
      by calling the subprocess -- used to create correct sized
      arrays