## Step 1: Define the optimization problem and its constraints
The problem requires minimizing the objective function: $4 \times \text{black pens} + 4 \times \text{headsets} + 8 \times \text{mechanical pencils} + 9 \times \text{lanyards}$, subject to various constraints on sustainability score, workplace safety impact, and usefulness rating.

## 2: List all the constraints
1. Sustainability score constraints:
- $20 \times \text{headsets} + 2 \times \text{lanyards} \geq 51$
- $9 \times \text{black pens} + 20 \times \text{headsets} + 10 \times \text{mechanical pencils} \geq 90$
- $9 \times \text{black pens} + 20 \times \text{headsets} + 10 \times \text{mechanical pencils} + 2 \times \text{lanyards} \geq 90$
- $9 \times \text{black pens} + 2 \times \text{lanyards} \leq 261$
- $10 \times \text{mechanical pencils} + 2 \times \text{lanyards} \leq 341$
- $20 \times \text{headsets} + 2 \times \text{lanyards} \leq 153$
- $20 \times \text{headsets} + 10 \times \text{mechanical pencils} \leq 136$
- $9 \times \text{black pens} + 10 \times \text{mechanical pencils} \leq 100$
- $9 \times \text{black pens} + 20 \times \text{headsets} + 2 \times \text{lanyards} \leq 182$
- $9 \times \text{black pens} + 20 \times \text{headsets} + 10 \times \text{mechanical pencils} \leq 208$

2. Workplace safety impact constraints:
- $16 \times \text{headsets} + 7 \times \text{lanyards} \geq 28$
- $16 \times \text{headsets} + 17 \times \text{mechanical pencils} \geq 45$
- $17 \times \text{mechanical pencils} + 7 \times \text{lanyards} \geq 66$
- $10 \times \text{black pens} + 16 \times \text{headsets} + 17 \times \text{mechanical pencils} + 7 \times \text{lanyards} \geq 66$
- $10 \times \text{black pens} + 17 \times \text{mechanical pencils} \leq 180$
- $10 \times \text{black pens} + 16 \times \text{headsets} \leq 281$
- $10 \times \text{black pens} + 7 \times \text{lanyards} \leq 197$
- $10 \times \text{black pens} + 16 \times \text{headsets} + 17 \times \text{mechanical pencils} \leq 107$
- $10 \times \text{black pens} + 16 \times \text{headsets} + 7 \times \text{lanyards} \leq 216$

3. Usefulness rating constraints:
- $16 \times \text{black pens} + 9 \times \text{lanyards} \geq 73$
- $16 \times \text{black pens} + 1 \times \text{mechanical pencils} \geq 72$
- $16 \times \text{black pens} + 12 \times \text{headsets} \geq 56$
- $12 \times \text{headsets} + 1 \times \text{mechanical pencils} \geq 62$
- $16 \times \text{black pens} + 12 \times \text{headsets} + 1 \times \text{mechanical pencils} + 9 \times \text{lanyards} \geq 62$
- $16 \times \text{black pens} + 9 \times \text{lanyards} \leq 332$
- $12 \times \text{headsets} + 1 \times \text{mechanical pencils} \leq 309$
- $16 \times \text{black pens} + 12 \times \text{headsets} \leq 235$

4. Other constraints:
- $-7 \times \text{black pens} + 3 \times \text{headsets} \geq 0$
- $\text{black pens}, \text{headsets}, \text{mechanical pencils}, \text{lanyards}$ are integers.

## 3: Formulate the problem in Gurobi
We will use Gurobi's Python interface to formulate and solve this problem.

```python
import gurobi as gp

# Define the model
m = gp.Model("optimization_problem")

# Define the variables
black_pens = m.addVar(name="black_pens", vtype=gp.GRB.INTEGER)
headsets = m.addVar(name="headsets", vtype=gp.GRB.INTEGER)
mechanical_pencils = m.addVar(name="mechanical_pencils", vtype=gp.GRB.INTEGER)
lanyards = m.addVar(name="lanyards", vtype=gp.GRB.INTEGER)

# Objective function
m.setObjective(4 * black_pens + 4 * headsets + 8 * mechanical_pencils + 9 * lanyards, gp.GRB.MINIMIZE)

# Constraints
# Sustainability score constraints
m.addConstr(20 * headsets + 2 * lanyards >= 51, name="sustainability_score_headsets_lanyards")
m.addConstr(9 * black_pens + 20 * headsets + 10 * mechanical_pencils >= 90, name="sustainability_score_black_pens_headsets_pencils")
m.addConstr(9 * black_pens + 20 * headsets + 10 * mechanical_pencils + 2 * lanyards >= 90, name="sustainability_score_all")
m.addConstr(9 * black_pens + 2 * lanyards <= 261, name="sustainability_score_black_pens_lanyards")
m.addConstr(10 * mechanical_pencils + 2 * lanyards <= 341, name="sustainability_score_pencils_lanyards")
m.addConstr(20 * headsets + 2 * lanyards <= 153, name="sustainability_score_headsets_lanyards_max")
m.addConstr(20 * headsets + 10 * mechanical_pencils <= 136, name="sustainability_score_headsets_pencils_max")
m.addConstr(9 * black_pens + 10 * mechanical_pencils <= 100, name="sustainability_score_black_pens_pencils_max")
m.addConstr(9 * black_pens + 20 * headsets + 2 * lanyards <= 182, name="sustainability_score_black_pens_headsets_lanyards_max")
m.addConstr(9 * black_pens + 20 * headsets + 10 * mechanical_pencils <= 208, name="sustainability_score_all_max")

# Workplace safety impact constraints
m.addConstr(16 * headsets + 7 * lanyards >= 28, name="workplace_safety_headsets_lanyards")
m.addConstr(16 * headsets + 17 * mechanical_pencils >= 45, name="workplace_safety_headsets_pencils")
m.addConstr(17 * mechanical_pencils + 7 * lanyards >= 66, name="workplace_safety_pencils_lanyards")
m.addConstr(10 * black_pens + 16 * headsets + 17 * mechanical_pencils + 7 * lanyards >= 66, name="workplace_safety_all")
m.addConstr(10 * black_pens + 17 * mechanical_pencils <= 180, name="workplace_safety_black_pens_pencils_max")
m.addConstr(10 * black_pens + 16 * headsets <= 281, name="workplace_safety_black_pens_headsets_max")
m.addConstr(10 * black_pens + 7 * lanyards <= 197, name="workplace_safety_black_pens_lanyards_max")
m.addConstr(10 * black_pens + 16 * headsets + 17 * mechanical_pencils <= 107, name="workplace_safety_all_max")
m.addConstr(10 * black_pens + 16 * headsets + 7 * lanyards <= 216, name="workplace_safety_black_pens_headsets_lanyards_max")

# Usefulness rating constraints
m.addConstr(16 * black_pens + 9 * lanyards >= 73, name="usefulness_rating_black_pens_lanyards")
m.addConstr(16 * black_pens + mechanical_pencils >= 72, name="usefulness_rating_black_pens_pencils")
m.addConstr(16 * black_pens + 12 * headsets >= 56, name="usefulness_rating_black_pens_headsets")
m.addConstr(12 * headsets + mechanical_pencils >= 62, name="usefulness_rating_headsets_pencils")
m.addConstr(16 * black_pens + 12 * headsets + mechanical_pencils + 9 * lanyards >= 62, name="usefulness_rating_all")
m.addConstr(16 * black_pens + 9 * lanyards <= 332, name="usefulness_rating_black_pens_lanyards_max")
m.addConstr(12 * headsets + mechanical_pencils <= 309, name="usefulness_rating_headsets_pencils_max")
m.addConstr(16 * black_pens + 12 * headsets <= 235, name="usefulness_rating_black_pens_headsets_max")

# Other constraints
m.addConstr(-7 * black_pens + 3 * headsets >= 0, name="other_constraint")

# Solve the model
m.optimize()

# Print the solution
if m.status == gp.GRB.OPTIMAL:
    print("Objective: ", m.objval)
    print("Black Pens: ", black_pens.varValue)
    print("Headsets: ", headsets.varValue)
    print("Mechanical Pencils: ", mechanical_pencils.varValue)
    print("Lanyards: ", lanyards.varValue)
else:
    print("The model is infeasible")
```