To solve Emma's optimization problem, we first need to define the decision variables, constraints, and objective function.

Let:
- \(D\) be the number of dresses produced per week.
- \(S\) be the number of suits produced per week.

The constraints based on the machine hours available are:
1. Sewing Machine Constraint: \(2D + S \leq 30\)
2. Embroidery Machine Constraint: \(4D + S \leq 50\)

The objective function to maximize profit is:
\[500D + 800S\]

Since we cannot produce a negative number of dresses or suits, we also have non-negativity constraints:
- \(D \geq 0\)
- \(S \geq 0\)

Given these definitions, the problem can be formulated as a linear programming problem. Here's how we translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Emma_Clothing_Production")

# Define variables
D = m.addVar(lb=0, vtype=GRB.CONTINUOUS, name="Dresses")
S = m.addVar(lb=0, vtype=GRB.CONTINUOUS, name="Suits")

# Define constraints
m.addConstr(2*D + S <= 30, "Sewing_Machine_Constraint")
m.addConstr(4*D + S <= 50, "Embroidery_Machine_Constraint")

# Define objective function
m.setObjective(500*D + 800*S, GRB.MAXIMIZE)

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Produces {D.x} dresses")
    print(f"Produces {S.x} suits")
    print(f"Maximum profit: ${500*D.x + 800*S.x}")
else:
    print("No optimal solution found")

```