import random
import string
import six


def get_random_ascii_chars(size, seed=0):
  """Generates binary string representation of a list of ASCII characters.

  Args:
    size: Integer quantity of characters to generate.
    seed: A seed may be specified for deterministic behavior.
          Int 0 is used as the default value.

  Returns:
    Binary encoded string representation of a list of characters of length
    equal to size argument.
  """
  random.seed(seed)
  contents = str([random.choice(string.ascii_letters) for _ in range(size)])
  contents = six.ensure_binary(contents)
  random.seed()  # Reset the seed for any other tests.
  return contents