code: def test_pinhole_camera_scale_inplace(self, device, dtype):
      batch_size = 2
      height, width = 4, 6
      fx, fy, cx, cy = 1, 2, width / 2, height / 2
      tx, ty, tz = 1, 2, 3
      scale_val = 2.0
  
      intrinsics = self._create_intrinsics(
          batch_size, fx, fy, cx, cy, device=device, dtype=dtype
      )
      extrinsics = self._create_extrinsics(
          batch_size, tx, ty, tz, device=device, dtype=dtype
      )
      height = (
          torch.ones(batch_size, device=device, dtype=dtype) * height
      )
      width = torch.ones(batch_size, device=device, dtype=dtype) * width
      scale_factor = (
          torch.ones(batch_size, device=device, dtype=dtype) * scale_val
      )
  
      pinhole = kornia.geometry.camera.PinholeCamera(
          intrinsics, extrinsics, height, width
      )
      pinhole_scale = pinhole.clone()
      pinhole_scale.scale_(scale_factor)
  
      assert_close(
          pinhole_scale.intrinsics[..., 0, 0],
          pinhole.intrinsics[..., 0, 0] * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )  # fx
      assert_close(
          pinhole_scale.intrinsics[..., 1, 1],
          pinhole.intrinsics[..., 1, 1] * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )  # fy
      assert_close(
          pinhole_scale.intrinsics[..., 0, 2],
          pinhole.intrinsics[..., 0, 2] * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )  # cx
      assert_close(
          pinhole_scale.intrinsics[..., 1, 2],
          pinhole.intrinsics[..., 1, 2] * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )  # cy
      assert_close(
          pinhole_scale.height,
          pinhole.height * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )
      assert_close(
          pinhole_scale.width,
          pinhole.width * scale_val,
          atol=1e-4,
          rtol=1e-4,
      )
  
imports: import math
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import assert_close, tensor_to_gradcheck_var
label_desc: Use image node_id 9 for calling the TestPinholeCamera obj's underlying member method code with example usage: obj.test_pinhole_camera_scale_inplace(device, dtype) without return types