code: def num_permutations(n, k, with_replacement=False):
      """
      Function to calculate the number of possible permutations.
  
      Parameters
      ----------
      n : `int`
        Total number of items.
      k : `int`
        Number of elements of the target itemset.
      with_replacement : `bool`
        Allows repeated elements if True.
  
      Returns
      ----------
      permut : `int`
        Number of possible permutations.
  
      Examples
      -----------
      For usage examples, please see
      https://rasbt.github.io/mlxtend/user_guide/math/num_permutations/
  
      """
      if with_replacement:
          permut = n**k
      else:
          numerator = factorial(n)
          denominator = factorial(n - k)
          permut = numerator // denominator
      return permut
  
label_desc: Use image node_id 3 for calling a global function with example usage: num_permutations(n, k, with_replacement) and returns: permut