code: def n_positive_integers(n, value):
      """Converts `value` to a sequence of `n` positive integers.
  
      `value` may be either be a sequence of values convertible to `int`, or a
      single value convertible to `int`, in which case the resulting integer is
      duplicated `n` times.  It may also be a TensorShape of rank `n`.
  
      Args:
        n: Length of sequence to return.
        value: Either a single value convertible to a positive `int` or an
          `n`-element sequence of values convertible to a positive `int`.
  
      Returns:
        A tuple of `n` positive integers.
  
      Raises:
        TypeError: If `n` is not convertible to an integer.
        ValueError: If `n` or `value` are invalid.
      """
  
      n_orig = n
      n = int(n)
      if n < 1 or n != n_orig:
          raise ValueError("n must be a positive integer")
  
      try:
          value = int(value)
      except (TypeError, ValueError):
          sequence_len = len(value)
          if sequence_len != n:
              raise ValueError(
                  "Expected sequence of %d positive integers, but received %r"
                  % (n, value)
              )
          try:
              values = tuple(int(x) for x in value)
          except:
              raise ValueError(
                  "Expected sequence of %d positive integers, but received %r"
                  % (n, value)
              )
          for x in values:
              if x < 1:
                  raise ValueError(
                      "expected positive integer, but received %d" % x
                  )
          return values
  
      if value < 1:
          raise ValueError(
              "expected positive integer, but received %d" % value
          )
      return (value,) * n
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  from collections import OrderedDict
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 14 for calling a global function with example usage: n_positive_integers(n, value) and returns: unknown, values