import random
import string


def _generate_postcode() -> str:
    """
    Generates a postcode string. This is not guaranteed to be valid currently, but will
    have the properties of
    - One letter
    - 1 or 2 numbers
    - A space
    - A number and 2 letters.
    
    :returns: Postcode string
    """

    first_letter = random.choice(string.ascii_uppercase)
    numbers = random.randint(1, 30)

    last_number = random.randint(1, 9)
    last_letters = ''.join(random.choice(string.ascii_uppercase) for _ in range(2))

    return first_letter + str(numbers) + ' ' + str(last_number) + last_letters