import random


def rand_byte(value=(0, 255)):
  """ random byte """
  if type(value) is int:
    return value
  elif type(value) is tuple:
    return random.randint(value[0], value[1])
  return random.randint(0, 255)