input: Below is an instruction that describes a task. Write a response that appropriately completes the request.
  
  def check_checkered_pattern(size: int) -> str:
      """ Given a size, this function generates a visual output using a checkered pattern
      with '#' and ' ' characters based on the given size. The output helps visualizing
      the alternating square pattern of a provided size.
      >>> check_checkered_pattern(7)
      '#######\\n # # # \\n#######\\n # # # \\n#######\\n # # # \\n#######\\n'
      """
      pattern = ""
      for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  pattern += '#'
              else:
                  pattern += ' '
          pattern += '\\n'
      return pattern
output:     pattern = ""
      for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  pattern += '#'
              else:
                  pattern += ' '
          pattern += '\\n'
      return pattern