code: def bytesto(bytes, to, bsize=1024):
      """convert bytes to megabytes.
      bytes to mb: bytesto(bytes, 'm')
      bytes to gb: bytesto(bytes, 'g' etc.
      From https://gist.github.com/shawnbutts/3906915
      """
      levels = {"k": 1, "m": 2, "g": 3, "t": 4, "p": 5, "e": 6}
      answer = float(bytes)
      for _ in range(levels[to]):
          answer = answer / bsize
      return answer
  
imports: import contextlib
  import itertools
  import math
  import operator
  import platform
  import hashlib
  import inspect
  import sys
  import uuid
  import os
  import asyncio
  import collections
  from pathlib import Path
  from snakemake._version import get_versions
  from snakemake_interface_common.exceptions import WorkflowError
label_desc: Use image node_id 15 for calling a global function with example usage: bytesto(bytes, to, bsize) and returns: answer