def search_range(nums, target):
low = <NUM_LIT:0><EOL>high = len(nums) - <NUM_LIT:1><EOL>while low <= high:<EOL><INDENT>mid = low + (high - low) // <NUM_LIT:2><EOL>if target < nums[mid]:<EOL><INDENT>high = mid - <NUM_LIT:1><EOL><DEDENT>elif target > nums[mid]:<EOL><INDENT>low = mid + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>for j in range(len(nums) - <NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>):<EOL><INDENT>if nums[j] == target:<EOL><INDENT>return [mid, j]<EOL><DEDENT><DEDENT>return [-<NUM_LIT:1>, -<NUM_LIT:1>]<EOL>
:type nums: List[int]
:type target: int
:rtype: List[int]