<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_tensor_size(self, tensor_name, partial_layout=None, mesh_dimension_to_size=None):
 """The size of a tensor in bytes. If partial_layout is specified, then mesh_dimension_to_size must also be. In this case, the size on a single device is returned. Args: tensor_name: a string, name of a tensor in the graph. partial_layout: an optional {string: string}, from MTF dimension name to mesh dimension name. mesh_dimension_to_size: an optional {string: int}, from mesh dimension name to size. Returns: an integer """

    return (self.get_tensor_dtype(tensor_name).size *
            self.get_tensor_num_entries(tensor_name, partial_layout,
                                        mesh_dimension_to_size))