code: def _calculate_type_bound_at_step(match_step):
      
      current_type_bounds = []
  
      if isinstance(match_step.root_block, QueryRoot):
          # The QueryRoot start class is a type bound.
          current_type_bounds.extend(match_step.root_block.start_class)
  
      if match_step.coerce_type_block is not None:
          # The CoerceType target class is also a type bound.
          current_type_bounds.extend(match_step.coerce_type_block.target_class)
  
      if current_type_bounds:
          # A type bound exists. Assert that there is exactly one bound, defined in precisely one way.
          return get_only_element_from_collection(current_type_bounds)
      else:
          # No type bound exists at this MATCH step.
          return None
docs: Return the GraphQL type bound at the given step, or None if no bound is given.