<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def metric_from_cell(cell):
 """Calculates the metric matrix from cell, which is given in the Cartesian system."""

    cell = np.asarray(cell, dtype=float)
    return np.dot(cell, cell.T)