code: def maxDistToClosest(self, seats: List[int]) -> int:
      count = 0
      result = 1
      flag = 0
      for i in range(len(seats)):
          count += 1
          if seats[i] == 1:
              if flag:
                  result = max(result, (count / 2))
              else:
                  result = max(result, count - 1)
                  flag = 1
              count = 0
      result = max(result, count)
      return int(result)
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.maxDistToClosest(seats) and returns: int