## Step 1: Define the symbolic variables
Let's define the symbolic variables for the problem:
- $x_1$ represents the square feet allocated for headset production
- $x_2$ represents the square feet allocated for keyboard production

## Step 2: Formulate the objective function
The objective function is to maximize revenue. Headsets produce a net revenue of $45 per sq. foot, and keyboards produce a net revenue of $80 per sq. foot. Therefore, the objective function can be written as:
Maximize $45x_1 + 80x_2$

## 3: Define the constraints
1. **Space constraint**: The factory has 120 sq. feet of space.
$x_1 + x_2 \leq 120$

2. **Cost constraint**: The factory wants to spend at most $5500. Headsets cost $10 per sq. foot, and keyboards cost $12 per sq. foot.
$10x_1 + 12x_2 \leq 5500$

3. **Labor constraint**: The factory has 2500 hours of labor. Headsets require 2.5 hours of labor per sq. foot, and keyboards require 3.5 hours of labor per sq. foot.
$2.5x_1 + 3.5x_2 \leq 2500$

4. **Non-negativity constraint**: The allocated space cannot be negative.
$x_1 \geq 0, x_2 \geq 0$

## 4: Symbolic representation
```json
{
'sym_variables': [('x1', 'headset sq. feet'), ('x2', 'keyboard sq. feet')],
'objective_function': '45*x1 + 80*x2',
'constraints': [
'x1 + x2 <= 120',
'10*x1 + 12*x2 <= 5500',
'2.5*x1 + 3.5*x2 <= 2500',
'x1 >= 0',
'x2 >= 0'
]
}
```

## 5: Gurobi code
```python
import gurobi

def optimize_factory_layout():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(name="headset_sq_feet", lb=0)
    x2 = model.addVar(name="keyboard_sq_feet", lb=0)

    # Objective function: maximize revenue
    model.setObjective(45 * x1 + 80 * x2, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x1 + x2 <= 120, name="space_constraint")
    model.addConstr(10 * x1 + 12 * x2 <= 5500, name="cost_constraint")
    model.addConstr(2.5 * x1 + 3.5 * x2 <= 2500, name="labor_constraint")

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Headset sq. feet: {x1.varValue}")
        print(f"Keyboard sq. feet: {x2.varValue}")
        print(f"Max revenue: {model.objVal}")
    else:
        print("No optimal solution found.")

optimize_factory_layout()
```