from collections import namedtuple


"""Document constants"""
countries = ["Mordor", "Gondor", "Lorien", "Shire"]
genders = ["Male", "Female"]
cities = {
    'Mordor': 'Minas Morgul,Barad Dur',
    'Gondor': 'Minas Tirith,Isengard,Osgiliath',
    'Lorien': 'Lorien',
    'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
    }
purpose = ["Visit", "Transit", "Work", "Immigrate"]

"""Store user input here"""
UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
UPass = namedtuple("UPass", "name gender purpose duration serial expires")
UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
URecord = namedtuple("URecord", "purpose duration")

from collections import namedtuple


def init():
    """Document constants"""
    global countries
    countries = ["Mordor", "Gondor", "Lorien", "Shire"]
    global genders
    genders = ["Male", "Female"]
    global cities
    cities = {
        'Mordor': 'Minas Morgul,Barad Dur',
        'Gondor': 'Minas Tirith,Isengard,Osgiliath',
        'Lorien': 'Lorien',
        'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
    }
    global purpose
    purpose = ["Visit", "Transit", "Work", "Immigrate"]

    """Store user input here"""
    global UPassport
    UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
    global UPass
    UPass = namedtuple("UPass", "name gender purpose duration serial expires")
    global UWorkVisa
    UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
    global URecord
    URecord = namedtuple("URecord", "purpose duration")

Define init function. Make variables actually global
Define init function. Make variables actually global

  from collections import namedtuple
  
  
+ def init():
- """Document constants"""
+     """Document constants"""
+     global countries
- countries = ["Mordor", "Gondor", "Lorien", "Shire"]
+     countries = ["Mordor", "Gondor", "Lorien", "Shire"]
+     global genders
- genders = ["Male", "Female"]
+     genders = ["Male", "Female"]
+     global cities
- cities = {
+     cities = {
-     'Mordor': 'Minas Morgul,Barad Dur',
+         'Mordor': 'Minas Morgul,Barad Dur',
-     'Gondor': 'Minas Tirith,Isengard,Osgiliath',
+         'Gondor': 'Minas Tirith,Isengard,Osgiliath',
-     'Lorien': 'Lorien',
+         'Lorien': 'Lorien',
-     'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
+         'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
      }
+     global purpose
- purpose = ["Visit", "Transit", "Work", "Immigrate"]
+     purpose = ["Visit", "Transit", "Work", "Immigrate"]
  
- """Store user input here"""
+     """Store user input here"""
+     global UPassport
- UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
+     UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
+     global UPass
- UPass = namedtuple("UPass", "name gender purpose duration serial expires")
+     UPass = namedtuple("UPass", "name gender purpose duration serial expires")
+     global UWorkVisa
- UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
+     UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
+     global URecord
- URecord = namedtuple("URecord", "purpose duration")
+     URecord = namedtuple("URecord", "purpose duration")
  
Define init function. Make variables actually global
## Code Before:
from collections import namedtuple


"""Document constants"""
countries = ["Mordor", "Gondor", "Lorien", "Shire"]
genders = ["Male", "Female"]
cities = {
    'Mordor': 'Minas Morgul,Barad Dur',
    'Gondor': 'Minas Tirith,Isengard,Osgiliath',
    'Lorien': 'Lorien',
    'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
    }
purpose = ["Visit", "Transit", "Work", "Immigrate"]

"""Store user input here"""
UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
UPass = namedtuple("UPass", "name gender purpose duration serial expires")
UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
URecord = namedtuple("URecord", "purpose duration")

## Instruction:
Define init function. Make variables actually global
## Code After:
from collections import namedtuple


def init():
    """Document constants"""
    global countries
    countries = ["Mordor", "Gondor", "Lorien", "Shire"]
    global genders
    genders = ["Male", "Female"]
    global cities
    cities = {
        'Mordor': 'Minas Morgul,Barad Dur',
        'Gondor': 'Minas Tirith,Isengard,Osgiliath',
        'Lorien': 'Lorien',
        'Shire': 'Hobbiton,Waymeet,Frogmorton,Tuckborough'
    }
    global purpose
    purpose = ["Visit", "Transit", "Work", "Immigrate"]

    """Store user input here"""
    global UPassport
    UPassport = namedtuple("UPassport", "country name gender isscity expdate serial")
    global UPass
    UPass = namedtuple("UPass", "name gender purpose duration serial expires")
    global UWorkVisa
    UWorkVisa = namedtuple("UWorkVisa", "name proff duration expires")
    global URecord
    URecord = namedtuple("URecord", "purpose duration")
