<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tensor_size_guidance_from_flags(flags):
 """Apply user per-summary size guidance overrides."""


  tensor_size_guidance = dict(DEFAULT_TENSOR_SIZE_GUIDANCE)
  if not flags or not flags.samples_per_plugin:
    return tensor_size_guidance

  for token in flags.samples_per_plugin.split(','):
    k, v = token.strip().split('=')
    tensor_size_guidance[k] = int(v)

  return tensor_size_guidance