Implement the find_smallest_pretty_integer function in a file named /app/solution.py.
Functionality:
The function should accept two lists of single-digit integers (0-9) and find the smallest "pretty integer" based on the following criteria:
Identify any common digits between the two lists.
If there are common digits, return the smallest common digit.
If there are no common digits, determine the smallest digit from each list and concatenate them to form the smallest pretty integer. The result should be returned as an integer.
Input Requirements:
The function find_smallest_pretty_integer(list1, list2) takes two parameters:
list1: A list of single-digit integers (e.g., [1, 3, 7])
list2: A list of single-digit integers (e.g., [2, 4, 7])
Output Requirements:
The function should return:
The smallest common digit (as an integer) if there are common digits.
The smallest concatenated pretty integer (as an integer) if there are no common digits.