#!/usr/bin/env python3
"""
Test Python file with intentional issues for testing MCP server capabilities
"""

import json
import time

def calculate_sum(a, b):
    return a + b

def process_list(arr):
    result = []
    for i in range(len(arr)):
        result.append(arr[i] * 2)
    return result

def fetch_data():
    time.sleep(1)
    return {"data": "test"}

def divide_numbers(x, y):
    if y == 0:
        raise ValueError("Division by zero")
    return x / y

def parse_json(json_string):
    return json.loads(json_string)

# Global mutable state (bad practice)
GLOBAL_COUNTER = 0

def increment_counter():
    global GLOBAL_COUNTER
    GLOBAL_COUNTER += 1
    return GLOBAL_COUNTER

# Missing type hints and docstrings
class DataProcessor:
    def __init__(self, data):
        self.data = data

    def process(self):
        return [x for x in self.data if x > 0]

if __name__ == "__main__":
    print(calculate_sum(1, 2))
    print(process_list([1, 2, 3]))
    print(fetch_data())
